fieldset element



Fieldset element is used to combine/categorize the items in a form.
<fieldset style="text-align:(Left/Right/Center);"> <legend><b>Title</b></legend> Text <input type="text" /> Text <input type="text" /> </fieldset>
Element Specific attributes supported by this element are:
disabled disabled It helps to turn off the fieldset. It is an boolean attribute.
form form_id Indicates the "ID" of the fieldset.
name text Mentions a name for the fieldset.

The above mentioned attributes were not applicable in HTML 4.01.

Example Code:

Result :

Personal Details Name



Email id

Mobile No

  • It is necessary to use <legend> with this element. It should be placed inside this tag.
  • <Legend> provides an outline.
It is available in previous versions of HTML.
It supports both Global Attributes and Event Attributes in HTML5.


It is applicable to all major browsers.

Ask Questions

Ask Question