HTML


"...Remember being a youngster, mom or dad telling you "close the door"? Well the same applies to HTML ...."

HTML Forms The HTML Form Tag


Register / Login

Register to post on our forums and use our advanced features.
User Name:          Password:   
 
  • Learn the 7 input types of HTML forms
  • Complete HTML forms tags list
  • Join our busy webmaster forums!

Forms start with the <form> tag, which tells the browser where to send the information, then they have a few input fields, then a usually a submit button and a reset button.

Let's get started.

As stated above, this tag starts the form. Here is an example use of the <form> tag:

<form action="http://www.geocities.com/cgi-bin/homestead/mail.pl?yourname" method="post">

This code will not show up in the web page, it's invisible. It is the "input types" that you put in your code that create the visible part of your HTML form, with the exception of input type hidden.

  • form * - tells the browser that the next section of the web page will be a form

  • method * - tells the browser how to send the information (possible values: post is the most often used, and there are a few others)

  • action * - tells the browser where to send the information (the one shown is a mailto: form, and sends it to an e-mail address. Otherwise, they are usually sent to a location)

  • enctype - this is only used when the action attribute is mailto. This tells your e-mail client what type of e-mail it will be sending

* = mandatory

Forms are a little tricky, you must have a script that will take the information and do something with it. In the above example, Geocities is using a CGI script named mail.pl.

You've learned how to start a form, now lets learn the rest. There are seven kinds of input types: "text", "checkbox", "radio", "hidden", "password", "reset", and "submit". These all have different attributes to them; read about them by following the remaining HTML form tutorials. There is also another type of input, which creates a large window into which one can type text, but it is not a true "input type", this is called the textarea.

Back to the HTML Forms menu.

 
Google Web ahfb2000   
 

Web Hosting


Price      
Space    
Transfer 
Platform 

Domain Names




Courtesy of
onestopdomains.com

PHP Scripts


  


About us  Advertise  Contact us  Privacy  Sitemap

Copyright © 1999 - 2007 Advanced HTML For Beginners and AHFB2000, All rights reserved.
Find out more about isphost.org and why you should avoid them at all cost.