Example

A simple <fieldset> tag:

Laboratory

description & Usage

<fieldset> is used to group related form elements in a form. To better understand, please review the example code above in the playground.

Within the <fieldset> tag, you use <legend> tag to specify a title for the group.

he <fieldset> tag draws a box around the elements inside it.

Browser compatibility and Support

# Chrome Edge Firefox Safari Opera
<fieldset>

Attributes

Attributes Values Description
disabled
disabled
It is used to disable the corresponding elements on the right side.
form
form-id
The name <form> is used for the tags inserted on the right side.
name
text
Specifies the name of the tag.

Global Attributes

The <fieldset> tag supports the HTML Global Attributes.

Event Attributes

The <fieldset> tag supports the HTML Event Attributes.

Default CSS

Most browsers will display the <fieldset> tag with the following default style: