<fieldset> Description:
The <fieldset> element allows authors to group labels and controls that are thematically related.
<fieldset> Web Browser Support:
- Netscape 6, 7
- Mozilla 1
- Firefox 1
- Internet Explorer 4, 5, 6
- Opera 6, 7, 8
- Safari 1
- HTML 4.0
- XHTML 1.0: XHTML Forms Module
<fieldset> Attributes:
- class (optional)
- dir (optional)
- id (optional)
- lang (optional)
- onclick (optional)
- ondblclick (optional)
- onkeydown (optional)
- onkeypress (optional)
- onkeyup (optional)
- onmousedown (optional)
- onmousemove (optional)
- onmouseout (optional)
- onmouseover (optional)
- onmouseup (optional)
- style (optional)
- title (optional)
<fieldset> End Tag:
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.

