HTML / Element / Initial coverage

<optgroup> Element

Status: Initial coverage Target: HTML Living Standard Specification checked: 2026-09-16

Technical Summary

The optgroup element represents a group of option elements with a common label. It is normally used as a descendant of select to present related choices separately from other choices.

The optgroup itself is not selectable. label provides the group name, while disabled defines a boundary that makes its options unavailable. Form submission is performed by select; the group label is not a submitted value.

Definition / Categories

ItemSpecification summary
MeaningA group of option elements with a common label
CategoriesNone
ContextA descendant of select
Content modelZero or one legend, followed by zero or more option, script-supporting, noscript, or div elements
Content attributesdisabled, label, and global attributes
DOM interfaceHTMLOptGroupElement, with disabled and label

The current content model includes the position of legend relevant to customizable select. For the conventional select pattern used widely in authoring, the basic form is a label attribute followed by option elements.

Group boundary

An optgroup's group consists of its descendant option elements. User agents are expected to present options in the same group as related to each other and separate from other options.

<label for="format">Format</label>
<select id="format" name="format">
  <optgroup label="Documents">
    <option value="html">HTML</option>
    <option value="markdown">Markdown</option>
  </optgroup>
  <optgroup label="Data">
    <option value="json">JSON</option>
  </optgroup>
</select>

The group label and an option's label are different pieces of information. The selected option's value participates in the form entry list; the optgroup label does not.

Label resolution

The UI label for an optgroup is resolved by the current HTML Standard's label algorithm. The precedence between legend in a customizable select and the conventional label attribute is an important boundary.

ConditionGroup-label resolutionScope to verify
First element child is legendThe legend's HTML-aware text contentGroup caption in a customizable select
No child legend, with a label attributeThe label attribute's valueConventional select authoring
Neither is presentThe empty stringThe label attribute is required when no child legend exists
<select name="component">
  <optgroup label="Standard elements">
    <option value="button">button</option>
  </optgroup>
</select>

For a conventional select, specify label explicitly when naming a group. The text of an option is not a substitute for the group label.

Disabled boundary

disabled is a boolean attribute. Setting it on an optgroup disables its options as a group. An option's own disabled IDL value can remain false while the option is effectively :disabled because it is inside a disabled group; these are separate observations.

<select name="plan">
  <optgroup label="Available">
    <option value="basic">Basic</option>
  </optgroup>
  <optgroup label="Discontinued" disabled>
    <option value="legacy">Legacy plan</option>
  </optgroup>
</select>
TargetOwn attributeEffective state
optgroupdisabled=trueIts disabled boundary affects the options in the group
option without own disabledoption.disabled=falseMatches :disabled inside a disabled optgroup and cannot be selected by the user
option with own disabledoption.disabled=trueCannot be selected because of its own disabled state

Form submission and option list

The optgroup is not a submittable form control and does not contribute a form value. The parent select creates the entry list from its selected options. The group label and disabled state are metadata and selection boundaries, not submitted values.

In the select's option list, the optgroup supplies structure for related choices. Only options can be selected; there is no standalone optgroup selection state or optgroup-only FormData entry.

DOM Interface

The optgroup element is exposed as HTMLOptGroupElement. It is not an element with a form owner or a value; its API exposes the group label and its own disabled attribute.

const group = document.querySelector('optgroup');

group.label;
group.disabled;
group.matches(':disabled');
group.querySelectorAll('option');
APISummaryBoundary
labelReflects the label attributeThe UI label algorithm has a boundary when a legend is present
disabledReflects the optgroup's own disabled attributeKeep it separate from an option's effective disabled state
querySelectorAll('option')Retrieves options in the groupSelection and submission follow the option and select models

Fact / Evidence

Normative definitions, label resolution, disabled boundaries, and form relations are recorded as claims with conditions and source locations. Browser implementation and accessibility-tree observations are separated into Implementation Evidence below.

Key facts and source locations
TypeFact / claimConditions and scopeStateSource
SPECoptgroup represents a group of options with a common label and is used as a descendant of select.Meaning, context, and content model.ReviewedHTML Standard: optgroup
SPECThe optgroup itself is not selectable; the selectable objects are its options.Select option list and group presentation.ReviewedHTML Standard: group and selection boundary
SPECdisabled disables an optgroup's options as a group, and the group label is resolved from a legend or the label attribute.Disabled boundary, conventional select, and customizable select legend.ReviewedHTML Standard: disabled and label
SPECHTMLOptGroupElement exposes disabled and label IDL attributes.DOM interface and attribute reflection.ReviewedHTML Standard: DOM interface
AAMoptgroup has a specification-level option-group mapping for accessibility APIs.Role, group label, and relation to child options.Specification reviewedHTML Accessibility API Mappings: optgroup

Evidence

  1. HTML Standard: The optgroup element — context, content model, label, disabled, selection boundary, and DOM interface
  2. HTML Standard: The select element — option list, select submission, and customizable-select relations
  3. HTML Standard: The option element — option disabledness, selection state, value, and optgroup boundary
  4. HTML Standard: The legend element — group labeling for optgroup in customizable select
  5. HTML Accessibility API Mappings — optgroup group mapping and platform API entry points
  6. Web Platform Tests: select element — related select, option, and optgroup tests

Implementation Evidence

Browser implementation, WPT, and accessibility observations are recorded separately from normative claims. Unrun items are not treated as reviewed.

Shared fixture / record: Fixture ID forms-core-v1 covers a disabled optgroup in select, the boundary between group disabledness and an option's own disabled attribute, FormData through select, and option :disabled state. Chrome 152.0.0.0 / Windows 10 / checked 2026-09-15. All 14 checks passed.

Implementation Evidence registry for optgroup
TypeReproduced scopeRecorded conditionsState
IMPLDisabled optgroup, effective option disabledness, and FormData through selectRan fixture ID forms-core-v1 in Chrome 152.0.0.0 / Windows 10. The group's own disabled attribute, the child option's disabled IDL value, :disabled matching, and omission of disabled options from FormData were observed. Multiple browsers and customizable select were not run.Reviewed (one Chrome)
WPTOptgroup, option list, disabled groups, and customizable-select testsMapped to the select-element WPT directory. The 2026-09-15 selected run did not register an optgroup-specific test result, so no individual pass/fail claim is made.Pending
AAMOptgroup group mapping, label exposure, and relation to child optionsSeparate conventional and customizable select observations in the browser accessibility tree, platform accessibility APIs, and assistive technology.Pending

This IMPL record is a Chrome-only DOM and form-API observation using the existing shared fixture. It is not registered as a cross-browser result until WPT-specific results, direct optgroup accessibility observations, and browser comparisons are available.

Coverage / Open Issues

  • ReviewedMeaning, context, content model, label and disabled attributes, and HTMLOptGroupElement IDL
  • ReviewedOptgroup/option selection boundary, select FormData relation, and disabled-group specification boundary
  • OpenOptgroup-specific WPT results and multi-browser comparison of disabledness, labels, and option lists
  • OpenRendering in conventional versus customizable select, optgroup legend, and first-legend label resolution
  • OpenComplete HTML-AAM mapping, platform APIs, and assistive-technology announcements for group labels

This is initial coverage. It records the scope checked in one Chrome environment; it does not claim identical rendering, interaction, or accessibility-API results across all browsers, nor complete verification of the optgroup element.

Related surface

For a beginner-friendly explanation of grouping, label, and disabled, see optgroup in Yugien. For the selection model as a whole, see select; for individual choices and selectedness, see option; and for legend inside customizable select, see legend.