HTML fieldset tag
HTML <fieldset> encloses the the form elements (Form structure) in a block under a common name.
The common name is specified using legend element.
<form method="post" action="files/fieldsettag.php">
<fieldset>
<legend> Form </legend>
Name:<input type="text" name="sname"><br>
Email:<input type="email" name="email"><br>
<input type="submit" name="submit">
</fieldset>
</form>
</>
Tag Uses
Specific uses of <fieldset> tagIt encloses the form in a block under a common title.
Nested fieldset elements may also be used.
Tag omission
Both starting and ending tags are necessary for the fieldset element.
Global Attributes
All the global attributes are applicable on the fieldset element.
Next Previous
Was this article helpful?