Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML select disabled attribute

HTML tag

Example

A disabled drop-down list:

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the disabled attribute.


Definition and Usage

The disabled attribute is a boolean attribute.

The disabled attribute specifies that the drop-down list should be disabled.

A disabled drop-down list is neither usable nor clickable.

You can set the disabled attribute until certain conditions are met (such as selecting a checkbox), then restore the user's use of the drop-down list. Then, you can use JavaScript to remove the value of the disabled attribute to make the drop-down list available again.


Differences between HTML 4.01 and HTML5

none.


Differences between HTML and XHTML

In XHTML, attribute minimization is forbidden; the disabled attribute must be defined as


HTML select Tag Reference HTML