HTML optgroup disabled property
Examples
A disabled option group:
<select>
<optgroup label="German Cars" disabled>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</optgroup>
</select>
<optgroup label="German Cars" disabled>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</optgroup>
</select>
try it"
Browser Support
All major browsers support the disabled attribute.
Note: 7 and earlier versions of Internet Explorer does not support the disabled attribute <optgroup> tag.
Definition and Usage
disabled attribute is a Boolean attribute.
disabled attribute specifies option group should be disabled.
Disabled option is neither available, nor click.
You can set the disabled property until certain conditions are met (such as selecting a check box), was restored to the user to use the option group. You can then use JavaScript to remove the value of the disabled attribute so that the option group become available.
Differences between HTML 4.01 and HTML5
no.
Differences between HTML and XHTML
In XHTML, prohibit attribute minimization, disabled attribute must be defined as <optgroup disabled = "disabled">.
grammar
<optgroup disabled>
HTML <optgroup> tag