Javatpoint Logo
Javatpoint Logo

HTML <fieldset> tag

HTML <fieldset> tag is used to group the logically related fields/labels contained within an HTML form.

The use of this tag is optional while creating an HTML form but using <filedset>, it is easy to understand the purpose of grouped elements of form.

The <legend> tag is used with the <fieldset> element as a first child to define the caption for the grouped related fields.

Syntax

Following are some specifications about the HTML <fieldset> tag

Display Block
Start tag/End tag Both Start and End tag
Usage Structural (Within HTML Form)

Example 1

Test it Now

Output:

HTML fieldset tag

Attribute

HTML Tags List = New in HTML5.

Tag-specific attribute

Attribute Value Description
disabledHTML Tags List disabled It specifies that all form controls within the fieldset element are disabled.
formHTML Tags List form_id It specifies the one or more form(s) to which fieldset controls belongs.
nameHTML Tags List text It specifies the name associated with fieldset. It will not display at the browser and useful with JS.

Global attribute

HTML < fieldset > tag supports the global attributes in HTML

Event attribute

HTML < fieldset > tag supports the event attributes in HTML.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<fieldset>YesYesYesYesYes




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA