<FORM> Tag & its Attribute
HTML Tag <FORM>
<FORM> Sets up a container for a form tag. Within the <FORM> tags, you can place form input tags such as <FIELDSET>, <INPUT>, <SELECT>, and <TEXTAREA>.
Attribute of <FORM> Tag
ACCEPT
Specifies a list of MIME types, separated by commas, that the server processing the form will handle correctly.
<FORM METHOD=POST ACCEPT="image/gif,
image/jpeg" ACTION="/image-collector.cgi">
Possible Values
URL
ACCEPT-CHARSET
Specifies the character encodings for input data that the server processing the form must accept. The value is a list of character sets as defined in RFC2045, separated by commas.
<FORM METHOD=POST
ACCEPT-CHARSET="ISO-8859-1"
ACTION="save.php">
Possible Values
Charset Formats
ACTION
Specifies the explicit or relative location of the form processing CGI application.
<FORM METHOD=POST
ACTION="/stat-collector.cgi">
Possible Values
URL
CLASS
Indicates which style class applies to the <FORM>.
<FORM METHOD=POST CLASS="dkm"
ACTION="save.php">
Possible Values
Any class name.
ENCTYPE
Specifies the MIME type used to submit (post) the form to the server . The default value is "application/x-www-form-urlencoded". Use the value "multipart/form-data" when the returned document includes files.
<FORM METHOD=POST ENCTYPE="application/xwww-
form-urlencoded"
ACTION="save.php">
Possible Values
Encryption type.
ID
Assigns a unique ID selector to an instance of the <FORM> tag. When you then assign a style to that ID selector, it affects only that one instance of the <FORM> tag.
<FORM ACTION="save.php"
METHOD=GET ID="dkm">
Possible Values
Any ID Name.
METHOD
Changes how form data is transmitted to the form processor. When you use METHOD=GET, the form data is given to the form processor in the form of an environment variable (QUERY_STRING). When you use METHOD=POST, the form data is given to the form processor as the standard input to the program.
<FORM METHOD=POST
ACTION="save.php">
Enter search keywords:
<INPUT TYPE=TEXT NAME="dkm" SIZE=20>
<INPUT TYPE=SUBMIT VALUE="find">
</FORM>
Possible Values
GET,POST
NAME
Assigns the form a name accessible by bookmark, script, and applet resources.
<FORM METHOD=POST ACTION="save.php"
NAME="frm1">
Possible Values
Any Name.
STYLE
Specifies Style Sheet commands that apply to the contents within the <FORM> tags.
<FORM STYLE="background: red">
Possible Values
CSS Property with value.
TARGET
Identifies in which previously named frame the output from the form processor should appear.
<FORM TARGET="output" METHOD=GET
ACTION="login.php">
Possible Values
URL
TITLE
Specifies text assigned to the tag. You might use this attribute for context-sensitive help within the document. Browsers may use this to show tool tips over the fill-out form.
<FORM METHOD=POST ACTION="login.php"
TITLE="login window">
Possible Values
Any Text Message.