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

<fieldset></fieldset>

By , About.com Guide

<fieldset> Description:

The <fieldset> element allows authors to group labels and controls that are thematically related.

<fieldset> Web Browser Support:
<fieldset> Attributes:
<fieldset> End Tag:
</fieldset> REQUIRED
Contents:

HTML forms and the elements to create them. The following tags are valid within the <fieldset> 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, legend, 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

<fieldset> Valid Context:

The <fieldset> tag is valid within the following tags:
blockquote, body, center, dd, div, fieldset, form, iframe, li, noframes, noscript, object, td, th

<fieldset> Usage:
  • standard fieldset
    <form>
    <fieldset>
    <input type="text" name="fname" value="firstname" />
    <input type="text" name="lname" value="lastname" />
    <input type="submit" />
    </fieldset>
    </form>
  • fieldset with legend
    <form>
    <fieldset>
    <legend>Please enter your full name</legend>
    First Name: <input type="text" name="fname" /><br />
    Last Name: <input type="text" name="lname" /><br />
    <input type="submit" />
    </fieldset>
    </form>
<fieldset> Special Notes:
  • Older browsers may not support this tag, or may support it in unexpected ways. Be sure to test across browsers when you use it.
  • This tag is well suited to styling your forms with CSS.
More <fieldset> Information:

Return to XHTML Element (HTML Tags) Library

Explore Web Design / HTML
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

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

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

All rights reserved.