Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML
tag

HTML
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>

Try it »


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

All major browsers support

tag.


Tag Definition and Usage Notes

The tag can group related elements within a form.
The tag draws a border around related form elements.

Tips and Notes

Tip: The tag defines a caption for

the element.


Differences between HTML 4.01 and HTML5

Some new attributes were added in HTML5 for

: disabled, form, name. These attributes are not supported in HTML 4.01.


property

New : New attributes in HTML5.

property Value Description
disabledNew disabled Specifies that the related form elements in the group should be disabled.
formNew form_id Specifies one or more forms to which the fieldset belongs.
nameNew text Specifies the name of the fieldset.

Global Attributes

The tag supports [HTML Global Attributes](/tags/ref-standardattributes.html).

Event attribute

The tag supports [HTML Event Attributes](/tags/ref-eventattributes.html).