Posts in current category

HTML5 <fieldset> tag

May 03, 2021 15:00 HTML5

Table of contents

HTML5 and fieldset tags are used to group related elements in a form:

   Name: <input type="text"><br>
   Email: <input type="text"><br>
   Date of birth: <input type="text">
Try it out . . .

Browser support

HTML5 <fieldset> tag HTML5 <fieldset> tag HTML5 <fieldset> tag HTML5 <fieldset> tag HTML5 <fieldset> tag

All major browsers support the hashtags.

Label definition and instructions for use

Labels group related elements within a form.

The label draws a border around the relevant form element.

Tips and comments

Tip: The label defines the title for the element.

The difference between HTML 4.01 and HTML5

Some new properties have been added to HTML5: disabled, form, name, which are not supported in HTML 4.01.


New: The new property in HTML5.

Property Value Describe
disabled New disabled Provides that the related form elements in the group should be disabled.
form New form_id Specifies one or more forms to which fieldset belongs.
name New text Specifies the name of the fieldset.

Global properties

The label supports the global properties of HTML.

The event property

The tag supports the event properties of HTML.