W3 3.2n
4.0y
NS 3.0n
4.0n
IE 3.0n
4.0y
TV 1.2n
2.1n

<FIELDSET>...</FIELDSET>

Description

Group a set of related controls in a form together. When a form contains a lot of fields it can be useful to group some of these fields together because they are related. The browser can use this group to define the tabbing order.

With the LEGEND element you can set a caption for a FIELDSET.

This element is only valid inside the FORM element.

DTD

<!ELEMENT FIELDSET - - (#PCDATA,LEGEND,(%flow;)*) -- form control group -->
<!ATTLIST FIELDSET
  %attrs;                              -- %coreattrs, %i18n, %events --  >
from the HTML 4.0 DTD, "Copyright © W3C, (MIT, INRIA, Keio). All Rights Reserved."

Attributes

Core attributes: class id style title
Internationalization attributes: dir lang
Events: onclick ondblclick onmousedown onmouseup onmouseover onmousemove onmouseout onkeypress onkeydown onkeyup

Examples

Source
Place your order :<BR>
<FORM>
<TABLE>
<TR valign="top"><TD colspan="2">
<FIELDSET><LEGEND>Address information</LEGEND>
Name <INPUT type="text" name="name"><BR>
Address <INPUT type="text" name="address"><BR>
City <INPUT type="text" name="city"><BR>
Country <INPUT type="text" name="country">
</FIELDSET>
</TD>
<TD>
<FIELDSET><LEGEND>What do you want today?</LEGEND>
<INPUT type="checkbox" name="Pizza">Pizza<BR>
<INPUT type="checkbox" name="Hamburger">Hamburger<BR>
<INPUT type="checkbox" name="Sandwich">Sandwich<BR>
<INPUT type="checkbox" name="Hot dog">Hot dog
<P>
Amount <INPUT type="text" name="amount">
</FIELDSET>
</TD></TR>
</TABLE>
</FORM>
 
Result
Place your order :
Address information Name
Address
City
Country
What do you want today? Pizza
Hamburger
Sandwich
Hot dog

Amount

Statistics