HTML Reference Guide


Tag Index | Content List | HTML FAQ


How do I make a form?

The basic element of the form is the <FORM > tag. This begins and closes the area enclosing the form elements. Any HTML coding can be contained within the form area to enhance the look of your form There are attributes within the form tag that are required to tell your browser where to send the information and how to do it.

The attribute ACTION tells your browser that URL to send the information to; this is typically a CGI program of some kind.

The other attribute is METHOD. There are two options in the METHOD attribute: 'get' or 'post'. The difference is actually somewhat complicated, but in simple language get encodes all the information into the URL that is sent and post send the data separately from the actual call to the script. Which do you use? Typically you will be using a set program someone else has created, and they will tell you which one to use. Whew!

Example code:

<FORM ACTION="action URL" METHOD=GET/POST>
Enter your name:
<BR>
<INPUT NAME="name" VALUE="John Smith" TYPE="text" SIZE=30 MAXLENGTH=3>
<P>
Select your age:
<BR>
<INPUT NAME="Age" VALUE="Young" TYPE="radio" SELECTED> Young
<BR>
<INPUT NAME="Age" VALUE="Old" TYPE="radio">Old
<P>
<INPUT VALUE="Submit Your Entry" TYPE="submit">
<INPUT VALUE="Clear This Form" TYPE="reset">
</FORM>

Result:

Enter your name:

Select your age:
Young
Old


  Free Web Pages | Super Links | Members Directory | Search | Privacy Statement | Site Map | Contact Us
Services: Create Free Web Page | Free Home Page | Free Web Page Builder
Free Web Page Templates | Free Web Sites | Free Web Space
Copyright © 1996 - 2006 WebSpawner.com. All rights reserved.