HTML <fieldset> Tag


The <fieldset> HTML tag is a structural element used to group related form controls within a web form. It is often used in conjunction with the 'legend' element, which provides a brief description or label for the group of form controls. By wrapping form elements like input fields, checkboxes, or radio buttons with <fieldset>, web developers can create a visual and semantic grouping of these elements. This enhances the accessibility and organization of forms, making it easier for users to understand and interact with the input fields that share a common purpose or theme. Additionally, <fieldset> elements can be styled and customized to improve the overall user experience.


Permitted Parents
Any element that accepts flow content
<legend> as first child; after that block, inline, and text
Start/End Tags
Start tag: required, End tag: required


<legend>Personal Information:</legend>
Name: <input type="text" size="30" />
Email: <input type="text" size="30" />


Attribute Definition
disabled Specifies that a group of related form elements should be disabled.
form Specifies one or more forms the fieldset belongs to.
name Specifies a name for the fieldset.

Global Attributes

The <fieldset> tag also supports the Global Attributes in HTML5

Event Attributes

The <fieldset> tag also supports the Event Attributes in HTML5

Browser Support

The following table will show you the current browser support for the HTML <fieldset> tag.

Edge Chrome Firefox Opera Safari
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview

Last updated by CSSPortal on: 30th March 2024