Tutorials References Exercises Videos Menu
Create Website Get Certified Upgrade

HTML <fieldset> disabled Attribute

❮ HTML <fieldset> tag

Example

Disable a group of related form elements:

<form action="/action_page.php">
  <fieldset disabled>
    <legend>Personalia:</legend>
    <label for="fname">First name:</label>
    <input type="text" id="fname" name="fname"><br><br>
    <label for="lname">Last name:</label>
    <input type="text" id="lname" name="lname"><br><br>
    <label for="email">Email:</label>
    <input type="email" id="email" name="email"><br><br>
    <label for="birthday">Birthday:</label>
    <input type="date" id="birthday" name="birthday"><br><br>
    <input type="submit" value="Submit">
  </fieldset>
</form>
Try it Yourself »

Definition and Usage

The disabled attribute is a boolean attribute.

When present, it specifies that a group of related form elements (a fieldset) should be disabled.

A disabled fieldset is unusable and un-clickable.

The disabled attribute can be set to keep a user from using the fields until some other condition has been met (like selecting a checkbox, etc.). Then, a JavaScript could remove the disabled value, and make the fieldset usable again.


Browser Support

The numbers in the table specify the first browser version that fully supports the attribute.

Attribute
disabled Yes Yes Yes 6.0 Yes

Syntax

<fieldset disabled>

❮ HTML <fieldset> tag