<form> Description:
The <form></form> tag defines a container for form controls and elements.
<form> Web Browser Support:
- Netscape 2, 3, 4, 6, 7
- Mozilla 1
- Firefox 1
- Internet Explorer 2, 3, 4, 5, 6
- Opera 3, 4, 5, 6, 7, 8
- Safari 1
- WebTV / MSNTV
- AvantGo Palm OS
- AvantGo Windows CE
- HTML 3.2, 4.0
- XHTML 1.0: XHTML Basic Forms Module, XHTML Forms Module, XHTML Intrinsic Events Module, XHTML Name Identification Module, XHTML Target Module
<form> Attributes:
- accept (optional)
- accept-charset (optional)
- action (optional)
- class (optional)
- dir (optional)
- enctype (optional)
- id (optional)
- lang (optional)
- method (optional)
- name (optional)
- onclick (optional)
- ondblclick (optional)
- onkeydown (optional)
- onkeypress (optional)
- onkeyup (optional)
- onmousedown (optional)
- onmousemove (optional)
- onmouseout (optional)
- onmouseover (optional)
- onmouseup (optional)
- onreset (optional)
- onsubmit (optional)
- style (optional)
- title (optional)
<form> End Tag:
</form> REQUIRED<form> Contents:
Form information, including input fields and submit buttons. The following tags are valid within the <form> tag:
a, abbr, acronym, address, applet, b, basefont, bdo, big, blockquote, br, button, center, cite, code, dfn, dir, div, dl, em, fieldset, font, form, h1, h2, h3,h4, h5, h6, hr, i, iframe, img, input, isindex, kbd, label, map, menu, noframes, noscript, object, ol, p, pre, q, s, samp, script, select, small, span, strike, strong, sub, sup, table, textarea, tt, u,
ul, var
<form> Valid Context:
The <form> tag is valid within the following tag:
blockquote, body, center, dd, div, fieldset, iframe, li, noframes, noscript, object, td, th
<form> Usage:
- standard form
<form>
<input type="text" name="fname" value="firstname">
<input type="text" name="lname" value="lastname">
<input type="submit">
</form>
<form> Special Notes:
- Use forms when you want to solicit information from your readers.
- Nested forms will not work.
- Some browsers insert an extra space where the <form> and </form> tags are. Keep this in mind when developing complex page layouts.

