Group related options with <optgroup> tags:
The <optgroup> is used to group related options in a drop-down list.
If you have a long list of options, groups of related options are easier to handle for a user.
Element | |||||
---|---|---|---|---|---|
<optgroup> | Yes | Yes | Yes | Yes | Yes |
NONE.
Attribute | Value | Description |
---|---|---|
disabled | disabled | Specifies that an option-group should be disabled |
label | text | Specifies a label for an option-group |
The <optgroup> tag also supports the Global Attributes in HTML.
The <optgroup> tag also supports the Event Attributes in HTML.
HTML DOM reference: OptionGroup Object
None.