1. Home
  2. Computing & Technology
  3. Web Design / HTML

<form></form>

By Jennifer Kyrnin, About.com

<form> Description:

The <form></form> tag defines a container for form controls and elements.

<form> Web Browser Support:

<form> Attributes:

<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.

More <form> Information:

Return to XHTML Element (HTML Tags) Library

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. HTML and XHTML
  5. XHTML
  6. HTML Tags
  7. The form Element - online forms - XHTML 1.0 HTML 4.0

©2008 About.com, a part of The New York Times Company.

All rights reserved.