Form

End Tag: Required
Support Key: 2 | 3 | 3.2 | 4 | IE1 | M2A1 | N1 | O2.1
What is it?
Attributes
Tag Example
Parent/Content Model
Tips & Tricks
Browser Peculiarities
= Index DOT Html by Brian Wilson [bloo@blooberry.com] =
Main Index | Element Tree | Element Index | HTML Support History


What is it?
The FORM element is used to delimit the range of data fields for a form. This element also serves to contain information on HOW to process the information collected in the form. There can be more than one form in a HTML document but the FORM element can not be nested. An explanation of HOW to process the submitted data is beyond the scope of these documents - please refer to the Forms Overview page for sites that deal with this subject in greater detail.

Two great testing sites to echo form info:
Method=GET:
http://hoohoo.ncsa.uiuc.edu/htbin/query
Method=POST:
http://hoohoo.ncsa.uiuc.edu/htbin-post/post-query

Common Attributes
%Core%
2 | 3 | 3.2 | 4 | IE3 | M | N4B2 | O
%Events%
2 | 3 | 3.2 | 4 | IE4B1 | M | N | O
%Language%
2 | 3 | 3.2 | 4 | IE4 | M | N | O

Specific Attributes
Accept-charset
2 | 3 | 3.2 | 4 | IE | M | N | O
Required? No
Description:
This specifies a list of acceptable language character sets for the form data. No mention is made what should happen if data is submitted that is NOT from any of these sets.
Values:
A space and/or comma separated list of language character sets.
Action
2 | 3 | 3.2 | 4 | IE1 | M2A1 | N1 | O2.1
Required? Yes
Description:
This specifies the action URL that will process the form contents. If this attribute is absent it defaults to the BASE URL of the current document.
Values: An absolute or relative URL
Enctype
2 | 3 | 3.2 | 4 | IE1 | M2A1 | N1 | O2.1
Required? No
Description:
This attribute specifies the MIME media type used to encode the name/value pairs for transport to the form processing mechanism, in case the protocol itself does not impose a format.
Values:
   application/x-www-form-urlencoded [DEFAULT]
   multipart/form-data [MIME type used when an INPUT TYPE=FILE field is present]
Method
2 | 3 | 3.2 | 4 | IE1 | M2A1 | N1 | O2.1
Required? No
Description:
This optional attribute specifies a method or protocol for accessing the ACTION URL. A method of GET will gather all form name/value pair information into a query URL that looks like:
   URL?name=value&name=value&name=value
where URL is the URL specified by the ACTION attribute, or the current document URL if no ACTION attribute was specified. In the POST method, the contents of the form are encoded exactly as with the GET method, but the contents are sent in environment variables in the HTTP transaction.
Values:
   GET [DEFAULT] | POST
Name
2 | 3 | 3.2 | 4 | IE3B1 | M | N2 | O3
Required? No
Description:
This attribute is used to give a unique label to this form group so that it can be referenced and manipulated with scripting code.
Values: Alphanumeric characters.
Target
2 | 3 | 3.2 | 4 | IE3A1 | M | N2 | O2.1
Required? No
Description:
This attribute specifies the named frame for the browser to display the form results after the user submits information to a processing script.
Values: The TARGET reserved names apply.
Example
<form METHOD="get" ACTION="http://hoohoo.ncsa.uiuc.edu/htbin/query" ENCTYPE="application/x-www-form-urlencoded">
   <input TYPE="password" NAME="foo">
</form>
Parent Model
%Block Parent%
Exceptions: <form>
Content Model
%In-line Content% | %Block Content% | <keygen>
Exceptions: <form>
Tips & Tricks Browser Peculiarities
Boring Copyright Stuff...