1. Computing

Discuss in my forum

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

©2013 About.com. All rights reserved.