HTML <fieldset> disabledAttribute

HTML fieldset 标签参考手册HTML <fieldset> Tag

Examples

Disable a group of related form elements:

<fieldset disabled>
  <legend>Personalia:</legend>
  Name: <input type="text"><br>
  Email: <input type="text"><br>
  Date of birth: <input type="text">
</fieldset>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Except for Internet Explorer and Safari, other mainstream browsers support the disabled attribute.


Definition and Usage

The disabled attribute is a boolean attribute.

The disabled attribute specifies that a group of form elements (a fieldset) should be disabled.

A disabled fieldset is unusable and un-clickable.

The disabled attribute can be set to allow users to use the input fields only when certain conditions are met (such as selecting a checkbox, etc.). Then, JavaScript can be used to remove the disabled value, making the fieldset usable.


Differences between HTML 4.01 and HTML5

The disabled attribute is a new attribute of the <fieldset> tag in HTML5.


Differences between HTML and XHTML

In XHTML, attribute minimization is forbidden, and the disabled attribute must be defined as <fieldset disabled="disabled">.


Syntax

<fieldset disabled>


HTML fieldset 标签参考手册HTML <fieldset> Tag Other Extensions