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

HTML optgroup disabled Attribute

HTML disabled attribute

HTML optgroup Tag Reference HTML tag

Example

A disabled option-group:

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the disabled attribute.

**Note:** Internet Explorer 7 and earlier versions do not support the The disabled attribute of the tag.


Definition and Usage

The disabled attribute is a boolean attribute.

The disabled attribute specifies that the option-group should be disabled.

A disabled option-group is neither usable nor clickable.

The disabled attribute can be set so that the user can only use the option-group after certain conditions are met (such as selecting a checkbox). JavaScript can then be used to remove the value of the disabled attribute to make the option-group usable 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 .


Syntax


HTML optgroup Tag Reference HTML tag