HTML <fieldset> tag

Updated: 11/13/2018 by Computer Hope
HTML fieldset tag

When writing in HTML, the <fieldset> tag is used to group related elements in a form by drawing a box around them. The following sections contain information about this tag, including an example of it in use, and related attributes and browser compatibility.


You can add a caption to the <fieldset> element using the <legend> tag.


The <fieldset> tag belongs to a group of tags called form elements.

Example of <fieldset> code

<legend>Personal Information:</legend>
Name: <input type="text"><br>
Address: <input type="text"><br>
Email: <input type="text"><br>
Phone: <input type="text">

Example result

Personal Information: Name:


Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. The following table shows all of the current unique HTML attributes for the <fieldset> tag, and a description of each.

Attribute Description
disabled Designates that the content in the fieldset element should be disabled.
form Designates the form(s) of where the fieldset belongs.
name Designates a name for the fieldset.


Edge Internet Explorer Firefox Safari Opera Chrome
All versions All versions All versions All version All versions All versions

Additional form elements

Browser, Compatibility, HTML form tag, URL, Web design terms