HTML » Tags » fieldset

Version: 4.0

Compability: Explorer 4, 5  Netscape 6

Syntax:
<fieldset> ... </fieldset>

The <fieldset> tag is used to group related form elements together with a caption and labels. The caption is created using the legend tag. One or more labels are created using the label tag. The browser is supposed to render the appearance of the caption and labels in a special manner.

The fieldset, label, and legend tags are poorly implemented by most browsers.
 
The closing tag is mandatory.
 

Examples

Code:
<form>
<fieldset>
<legend>Please Enter Your Name</legend>
<label for="firstname">First Name</label><input type="text" id="firstname">
<br>
<label for="lastname">Last Name</label><input type="text" id="lastname">
</fieldset>
</form>
Output:
Please Enter Your Name
Language(s): HTML

See Also: