HTML <fieldset> disabled Attribute
Definition and Usage
disabled
The attribute is a boolean attribute.
If this attribute is set, it specifies that a group of related form elements (fieldset) should be disabled.
Disabled fieldset (fieldset) is not available and cannot be clicked.
Can be set disabled
The attribute can prevent users from using these fields until certain other conditions are met (such as checking a checkbox, etc.). Then, JavaScript can remove the disabled value and make the fieldset available again.
Example
Disable a group of related form elements:
<form action="/action_page.php"> <fieldset disabled> <legend>Personal Information:</legend> <label for="fname">Name:</label> <input type="text" id="fname" name="fname"><br><br> <label for="lname">Surname:</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>
Syntax
<fieldset disabled>
Browser Support
The numbers in the table indicate the first browser version that fully supports this attribute.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | 6.0 | Support |
disabled
Attributes are new tags in HTML5 for the <fieldset> tag.