HTML: The Markup Language Reference

optgroupgroup of options # T

The optgroup element represents a group of option elements with a common label.

Permitted contents #

zero or more option elements

Permitted attributes #

global attributes
Any attributes permitted globally.
label = string #
Specifies the name of the group of options its optgroup element represents.
disabled = "disabled" or "" (empty string) or empty #
Specifies that the element represents a disabled control.

Tag omission #

An optgroup element must have a start tag.

An optgroup element’s end tag may be omitted if the optgroup element is immediately followed by another optgroup element, or if there is no more content in the parent element.

Permitted parent elements #


DOM interface #

interface HTMLOptGroupElement : HTMLElement {
           attribute boolean disabled;
           attribute DOMString label;