home *** CD-ROM | disk | FTP | other *** search
Wrap
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html lang=en> <head> <title>FIELDSET - Form Control Group</title> <link rev=Made href="mailto:liam@htmlhelp.com"> <link rel=Start href="../index.html"> <link rel=Glossary href="http://www.htmlhelp.com/glossary/glossary.html"> <link rel=Copyright href="http://www.htmlhelp.com/copyright.html"> <link rel=StyleSheet href="../style.css" type="text/css"> <link rel=StyleSheet href="../aural.css" type="text/css" media=aural> <meta http-equiv="Content-Script-Type" content="text/javascript"> <meta name="author" content="Liam Quinn"> <meta name="description" content="A description of HTML 4.0's FIELDSET element for grouping form controls."> <meta name="keywords" content="FIELDSET, fieldset element, form, controls, control group, grouping, forms, HyperText Markup Language, HTML, HTML4, HTML 4.0, Web Design Group, WDG, <fieldset> tag, <FIELDSET> tag"> <script type="text/javascript"> <!-- function toggle() { if (document.all.toggler.value == "Hide non-strict elements") { document.styleSheets[0].addRule("span.transitional", "display:none"); document.styleSheets[0].addRule(".transitional", "speak:none"); document.all.toggler.value = "Show non-strict elements"; } else { document.styleSheets[0].addRule("span.transitional", "display:inline"); document.styleSheets[0].addRule(".transitional", "speak:inherit"); document.all.toggler.value = "Hide non-strict elements"; } } // --> </script> </head> <body> <h2><img src="../wdglogo1.gif" width=250 height=83 alt="The Web Design Group"></h2> <h1>FIELDSET - Form Control Group</h1> <script type="text/javascript"> <!-- if (document.styleSheets) { var gt; gt = unescape(new String("%3E")); document.write("<p" + gt + "<input type=button value=\"Hide non-strict elements\" id=toggler accesskey=s onclick=\"toggle()\"" + gt + "<\/p" + gt); } // --> </script> <table> <tr valign=top> <th>Syntax</th> <td><strong class=required><FIELDSET></strong>...<strong class=required></FIELDSET></strong></td> </tr> <tr valign=top> <th>Attribute Specifications</th> <td> <ul> <li><a href="../attrs.html">common attributes</a></li> </ul> </td> </tr> <tr valign=top> <th>Contents</th> <td>A <a href="legend.html">LEGEND</a> element followed by zero or more <a href="../block.html">block-level elements</a> and <a href="../inline.html">inline elements</a></td> </tr> <tr valign=top> <th>Contained in</th> <td><span class=transitional><a href="../special/applet.html">APPLET</a>, </span><a href="../block/blockquote.html">BLOCKQUOTE</a>, <a href="../html/body.html">BODY</a>, <span class=transitional><a href="../block/center.html">CENTER</a>, </span><a href="../lists/dd.html">DD</a>, <a href="../phrase/del.html">DEL</a>, <a href="../block/div.html">DIV</a>, FIELDSET, <a href="form.html">FORM</a>, <span class=transitional><a href="../special/iframe.html">IFRAME</a>, </span><a href="../phrase/ins.html">INS</a>, <a href="../lists/li.html">LI</a>, <a href="../special/map.html">MAP</a>, <span class=transitional><a href="../frames/noframes.html">NOFRAMES</a>, </span><a href="../block/noscript.html">NOSCRIPT</a>, <a href="../special/object.html">OBJECT</a>, <a href="../tables/td.html">TD</a>, <a href="../tables/th.html">TH</a></td> </tr> </table> <p>The <strong class=html>FIELDSET</strong> element defines a <em>form control group</em>. By grouping related form controls, authors can divide a form into smaller, more manageable parts, improving the usability disaster that can strike when confronting users with too many form controls. The grouping provided by <strong class=html>FIELDSET</strong> also helps the accessibility of forms to those using aural browsers by allowing these users to more easily orient themselves when filling in a large form.</p> <p>While <strong class=html>FIELDSET</strong> is not widely supported by current browsers, it can be used safely by explicitly closing any preceding <strong class=html><a href="../block/p.html">P</a></strong> element with <strong class=html></P></strong> or by including an empty <strong class=html>P</strong> prior to the <strong class=html>FIELDSET</strong>. This causes non-supporting browsers to infer the start of a <a href="../block.html">block-level element</a> even though they ignore the block-level <strong class=html>FIELDSET</strong> element.</p> <p>The content of a <strong class=html>FIELDSET</strong> element must begin with a <strong class=html><a href="legend.html">LEGEND</a></strong> to provide a caption for the group of controls. Following the <strong class=html>LEGEND</strong>, <strong class=html>FIELDSET</strong> may contain any <a href="../inline.html">inline</a> or <a href="../block.html">block-level</a> element, including another <strong class=html>FIELDSET</strong>.</p> <p>An example follows:</p> <pre class=example><code class=html><FORM METHOD=post ACTION="/cgi-bin/order.cgi"> <strong><FIELDSET></strong> <LEGEND ACCESSKEY=I>Contact Information</LEGEND> <TABLE> <TR> <TD> <LABEL FOR=name ACCESSKEY=N>Name:</LABEL> </TD> <TD> <INPUT TYPE=text NAME=name ID=name> </TD> </TR> <TR> <TD> <LABEL FOR=email ACCESSKEY=E>E-mail Address:</LABEL> </TD> <TD> <INPUT TYPE=text NAME=email ID=email> </TD> </TR> <TR> <TD> <LABEL FOR=addr ACCESSKEY=A>Mailing Address:</LABEL> </TD> <TD> <TEXTAREA NAME=address ID=addr ROWS=4 COLS=40></TEXTAREA> </TD> </TR> </TABLE> <strong></FIELDSET></strong> <strong><FIELDSET></strong> <LEGEND ACCESSKEY=O>Ordering Information</LEGEND> <P>Please select the product(s) that you wish to order:</P> <P> <LABEL ACCESSKEY=3> <INPUT TYPE=checkbox NAME=products VALUE="HTML 3.2 Reference"> <A HREF="/reference/wilbur/">HTML 3.2 Reference</A> </LABEL> <BR> <LABEL ACCESSKEY=4> <INPUT TYPE=checkbox NAME=products VALUE="HTML 4.0 Reference"> <A HREF="/reference/html40/">HTML 4.0 Reference</A> </LABEL> <BR> <LABEL ACCESSKEY=S> <INPUT TYPE=checkbox NAME=products VALUE="CSS Guide"> <A HREF="/reference/css/">Cascading Style Sheets Guide</A> </LABEL> </P> <strong></FIELDSET></strong> <strong><FIELDSET></strong> <LEGEND ACCESSKEY=C>Credit Card Information</LEGEND> <P> <LABEL ACCESSKEY=V> <INPUT TYPE=radio NAME=card VALUE=visa> Visa </LABEL> <LABEL ACCESSKEY=M> <INPUT TYPE=radio NAME=card VALUE=mc> MasterCard </LABEL> <BR> <LABEL ACCESSKEY=u> Number: <INPUT TYPE=text NAME=number> </LABEL> <BR> <LABEL ACCESSKEY=E> Expiry: <INPUT TYPE=text NAME=expiry> </LABEL> </P> <strong></FIELDSET></strong> <P> <INPUT TYPE=submit VALUE="Submit order"> <INPUT TYPE=reset VALUE="Clear order form"> </P> </FORM></code></pre> <h2>More Information</h2> <ul> <li><a href="http://www.w3.org/TR/REC-html40/interact/forms.html#edef-FIELDSET">FIELDSET in <abbr class=initialism title="World Wide Web Consortium">W3C</abbr> HTMLá4.0 Recommendation</a></li> </ul> <div class=footer> <address>Maintained by <a href="http://www.htmlhelp.com/%7Eliam/">Liam Quinn</a> <<a href="mailto:liam@htmlhelp.com">liam@htmlhelp.com</a>></address> <p class=toolbar><a href="http://www.htmlhelp.com/"><img src="../wdglogo-small.gif" width=105 height=40 alt="Web Design Group ~"></a> <a href="../index.html" rel=Start>HTMLá4.0áReference</a>á~ <a href="../olist.html">ElementsábyáFunction</a>á~ <a href="../alist.html">ElementsáAlphabetically</a></p> <p class=copyright><a href="http://www.htmlhelp.com/copyright.html">Copyright ⌐</a> 1998 Liam Quinn. All rights reserved.</p> </div> </body> </html>