">
" />
Easy Tutorial
❮ Html Colorname Canvas Stroketext ❯

HTML <fieldset> Tag

Example

Group related elements in a form:

<form>
  <fieldset>
    <legend>Personalia:</legend>
    Name: <input type="text"><br>
    Email: <input type="text"><br>
    Date of birth: <input type="text">
  </fieldset>
</form>

Browser Support

All major browsers support the <fieldset> tag.


Tag Definition and Usage

The <fieldset> tag is used to group related elements in a form.

The <fieldset> tag draws a border around the related form elements.


Tips and Notes

Tip: The <legend> tag defines a caption for the <fieldset> element.


Differences Between HTML 4.01 and HTML5

HTML5 introduced new attributes for <fieldset>: disabled, form, and name, which are not supported in HTML 4.01.


Attributes

Attribute Value Description
disabled New disabled Specifies that the related form elements should be disabled.
form New form_id Specifies one or more forms the fieldset belongs to.
name New text Specifies the name of the fieldset.

Global Attributes

The <fieldset> tag supports HTML global attributes.


Event Attributes

The <fieldset> tag supports HTML event attributes.

❮ Html Colorname Canvas Stroketext ❯