The cover of The Complete Idiot's Guide to Create a Web Page The Complete Idiot's HTML Tag Reference

| Index | Previous Tag: <FONT> | Next Tag: <FRAME> |


<FORM>

A container that holds the controls used on a form.

Support:

HTML StandardInternet ExplorerNetscape Navigator
2.0 and later 1.0 and later 1.0 and later
Notes:
  • This tag requires the </FORM> end tag.
Attributes:
ACCEPT-CHARSET = "Text"
A list of characters sets for the form data.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later Not supported Not supported

ACTION = "Text" (Required)
The URL of the script that will process the form data.

Support:

HTML StandardInternet ExplorerNetscape Navigator
2.0 and later 1.0 and later 1.0 and later

AUTOCOMPLETE = "Yes/No"
Determines whether the form allows Internet Explorer 5's AutoComplete feature to save form data for later re-use.

Support:

HTML StandardInternet ExplorerNetscape Navigator
Not supported 5.0 and later Not supported

CLASS = "Text"
The style sheet class used by the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 3.0 and later 4.0 and later

Notes:

  • You can specify two or more classes; be sure to separate each class name with a space.

ENCTYPE = "Text"
The content type used to submit the form.

Support:

HTML StandardInternet ExplorerNetscape Navigator
2.0 and later 1.0 and later 1.0 and later

Notes:

  • The only time you need to worry about this attribute is when you're using the <INPUT> tag's TYPE="FILE" attribute.

ID = "Text"
An alphanumeric string that uniquely identifies the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 3.0 and later 4.0 and later

Notes:

  • Although you can use letters and numbers for the ID, the first character must be a letter.

LANG = "Text"
The language used by the tag's attribute values and text content.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 4.0 and later Not supported

METHOD = "Text"
How the data is submitted to the server.

Support:

HTML StandardInternet ExplorerNetscape Navigator
2.0 and later 1.0 and later 1.0 and later

Notes:

  • Use either POST (preferred) or GET.

NAME = "Text"
The name of the form.

Support:

HTML StandardInternet ExplorerNetscape Navigator
Not supported 3.0 and later 2.0 and later

Notes:

  • The NAME attribute enables scripts to work with this form.

STYLE = "Text"
The style or styles to use with the tag.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 3.0 and later 4.0 and later

Notes:

  • If you enter multiple style properties, separate each one with a semi-colon (;).

TARGET = "Text"
The name of the frame in which the form's results should appear.

Support:

HTML StandardInternet ExplorerNetscape Navigator
4.0 and later 3.0 and later 2.0 and later

Notes:

  • HTML recognizes three pre-fab TARGET names:
    _self Loads the new page in the same frame that contains the link.
    _top Loads the new page into the entire window (it breaks out of the frame structure).
    _blank Loads the new page into a new browser window.

Example:
<FORM ACTION="http://www.mcfedries.com/cgi-win/formtest.exe" METHOD=POST>
First Name: <INPUT TYPE=TEXT NAME="First">
<P>
Last Name: <INPUT TYPE=TEXT NAME="Last">
<P>
Nickname: <INPUT TYPE=TEXT NAME="Nick">
<P>
Stage Name: <INPUT TYPE=TEXT NAME="Stage">
<P>
<INPUT TYPE=SUBMIT VALUE="Just Do It!">
<INPUT TYPE=RESET VALUE="Just Reset It!">
</FORM>
How It Looks:
First Name:

Last Name:

Nickname:

Stage Name:


| Index | Previous Tag: <FONT> | Next Tag: <FRAME> |