This element groups <form>
elements together by
drawing a rectangle around all elements within its opening and closing tags.
<fieldset> |
Yes | Yes | Yes | Yes | Yes |
New attributes are being added in HTML5 for fieldset.
The <fieldset> tag supports the Global Attributes in HTML.
The <fieldset> tag supports the Event Attributes in HTML.
fieldset { display: block; margin-left: 2px; margin-right: 2px; padding-top: 0.35em; padding-bottom: 0.625em; padding-left: 0.75em; padding-right: 0.75em; border: 2px groove (internal value); }
A demo showing how to use <fieldset> tag.
<html>
<body>
<form name="form1" method="post" action="">
<p>
<fieldset>
<input type="text"
name="textfield"
value="First text field in first fieldset"
size="60"/><br/>
<input type="text"
name="textfield2"
value="Second text field in first fieldset"
size="50"/>
</fieldset>
</p><!--from w w w.j a v a2 s . c om-->
</form>
</body>
</html>