HTML: The Markup Language

optgroupgroup of options # T

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

Permitted content #

zero or more option elements

Permitted attributes #

Descriptions for attributes specific to this element #

label = string
Specifies the name of the group of options its optgroup element represents.

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 #

select

DOM interface #

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