HTML / Element / Initial coverage

The <option> Element

Status: Initial coverage Scope: HTML Living Standard Specification checked: 2026-09-13

Technical Summary

The option element represents an option in a select element or a suggestion in a datalist. The option is not itself a form control; it has meaning inside its parent selection or suggestion model.

label is the user-facing label, value is the value used for processing and submission, and selected records an initial choice. The current choice is a separate internal state called selectedness and is exposed through option.selected.

Definition / Categories

ItemSpecification summary
MeaningAn option in select, or a suggestion in datalist
CategoriesNone
ContextA descendant of select, datalist, or optgroup
Content modelDepends on the presence of label and value, and on whether it is inside datalist. It can be text, or restricted phrasing content / div content
Tag omissionThe end tag may be omitted before another option, optgroup, or hr, or at the end of the parent. Explicit end tags remain clearer for ordinary authoring

An option with both label and value has an empty content model. Without label, an option in select can contain text or restricted content; an option in datalist has a text content model.

Label and value

For the specification's label, a non-empty label attribute takes precedence; otherwise the value of the text IDL attribute is used. For the option's value, the value attribute takes precedence; otherwise collected option text is used.

InformationResolution ruleImplementation point
UI labelNon-empty label attribute, otherwise option.textKeep the display label separate from the submitted value
Option valuevalue attribute, otherwise collected option textExplicitly set the submitted value so a display-text edit does not silently change it
Option textCollect descendant text, strip and collapse ASCII whitespace, and skip script elementstextContent and option.text do not necessarily return the same result
<select name="format">
  <option value="html">HTML</option>
  <option value="markdown" label="Markdown"></option>
</select>

For ordinary authoring, putting the visible label in the child text and explicitly setting value is the easiest structure to read and audit. When using the less common label attribute form, check both the content model and the label-resolution rule.

Selectedness and initial state

The selected attribute is a boolean attribute representing the option's default selectedness. Selectedness is the current state. User interaction or setting option.selected can change current state without making the HTML attribute mean the same thing.

ConceptMeaningDOM counterpart
selected attributeThe initial-selection declaration recorded in HTMLoption.hasAttribute('selected')
Default selectednessThe initial state and reset baselineoption.defaultSelected
SelectednessWhether the option is selected nowoption.selected
DirtinessA state that separates user or IDL changes from later effects of the selected attributeNot exposed as a public IDL attribute
<select id="format">
  <option id="html" value="html">HTML</option>
  <option id="md" value="markdown" selected>Markdown</option>
</select>

const option = document.querySelector('#md');
option.defaultSelected; // true
option.selected;        // current selectedness
option.selected = false; // changes current state and sets dirtiness

In a select without multiple, setting one option's selectedness to true causes the other options in the same option list to become false. When comparing initialization, user interaction, DOM changes, and reset, record attributes and state separately.

Disabled and optgroup

An option is disabled when it has its own disabled attribute or is inside a disabled optgroup. Disabled prevents user selection, but it does not make every programmatic change to selectedness impossible.

<select name="plan">
  <option value="basic">Basic</option>
  <optgroup label="Discontinued" disabled>
    <option value="legacy">Legacy plan</option>
  </optgroup>
  <option value="pro">Pro</option>
</select>

The disabled attribute on optgroup affects options in that group. The group itself is not selectable; the selectable objects are the options.

Form submission and form owner

An option is not a listed or submittable form control. The parent select constructs the form entry list, and the values of selected options participate together with the select's name.

HTMLOptionElement.form returns the form owner of the nearest ancestor select; it does not mean that the option itself is form-associated. An option outside a select, or an option inside datalist, returns null.

Structureoption.formForm meaning
form > select > optionThe ancestor formThe selected option's value participates in the select's entry list
Select outside a form with a form attributeThe select's form ownerThe option follows the form owner resolved by its select
datalist > optionnullThe associated input's value, not the suggestion object itself, is submitted

DOM Interface

The option element is exposed as HTMLOptionElement. Use selected and defaultSelected, and use text and value for their respective purposes.

const option = document.querySelector('option');

option.disabled;
option.form;
option.label;
option.defaultSelected;
option.selected;
option.value;
option.text;
option.index;

const created = new Option('Pro', 'pro', true, false);
APISummary
disabledBoolean reflecting the option's own disabled attribute; effective disabledness can also come from a disabled optgroup
labelString reflecting the label attribute, or the resolved option label when absent
defaultSelectedBoolean reflecting the selected content attribute
selectedReads and writes current selectedness; setting it also affects dirtiness
valueThe option value, falling back to collected option text when the attribute is absent
textWhitespace-normalized option text; setting it replaces the child content
index / formIndex in the option list and the form owner of the nearest select
new Option()Legacy factory function whose arguments are text, value, defaultSelected, and selected

With three or fewer arguments, new Option('Pro', 'pro', true) sets the selected attribute but does not make initial selectedness true. The fourth argument explicitly sets initial selectedness.

Fact / Evidence

Normative definitions, states, and form relationships are recorded with their claims, conditions, status, and source locations. Browser implementation and accessibility-tree observations are kept separate in Implementation Evidence below.

Key facts and source locations
TypeFact / claimConditions / scopeStatusSource
SPECoption represents an option in select or a suggestion in datalist.Option definition and usage contexts.ReviewedHTML Standard: the option element
SPECAn option's label resolves from the label attribute or option text, and its value resolves from the value attribute or collected text.Presence of label / value attributes and the text-collection algorithm.ReviewedHTML Standard: label and value
SPECThe selected attribute represents default selectedness, which is distinct from current selectedness.Initialization, user interaction, IDL changes, reset, and the single-select model.ReviewedHTML Standard: selectedness
SPECdisabled is resolved from the option itself or a disabled optgroup.User selection, programmatic state changes, and the optgroup boundary.ReviewedHTML Standard: disabled
SPECAn option is not a form-control category; option.form returns the form owner of its nearest select.Options in select, options in datalist, and presence of a form owner.ReviewedHTML Standard: form IDL

Evidence

  1. HTML Standard: The option element — context, content model, attributes, selectedness, label, value, and DOM interface
  2. HTML Standard: The select element — option list, single / multiple selection, reset, and form-submission relationships
  3. HTML Standard: The datalist element — using option as an input suggestion
  4. HTML Accessibility API Mappings — option role, selected state, and disabled state boundaries
  5. Web Platform Tests: select element — entry point for tests covering option, selectedness, and select behavior

Implementation Evidence

Browser implementation, WPT, and accessibility observations are recorded separately from normative claims. At page creation time, unrun items are not treated as reviewed.

Shared fixture / record: Fixture ID forms-core-v1 covers initial selectedness, selectedness changes and reset, label / value / text, disabled option and optgroup, FormData through select, option in datalist, and the HTMLOptionElement API. Chrome 152.0.0.0 / Windows 10 / checked 2026-09-15. All 14 checks passed.

Implementation evidence registry for the option element
TypeVerification scopeConditions to recordStatus
IMPLlabel, value, text, defaultSelected, selected, index, form, disabled, and selectedness after resetRan fixture ID forms-core-v1 in Chrome 152.0.0.0 / Windows 10. The IDL selected value changed while the selected attribute remained, and form reset restored selectedness. label, value, text, index, and form owner were retrieved; an option under a disabled optgroup matched :disabled even with disabled=false; disabled options were omitted from FormData. Single / multiple selection, datalist option, and an external select's form owner also passed.Reviewed (one Chrome)
WPTTests for option, selectedness, disabled state, select option lists, and form submissionFrom the select element test directory, ran option-selectedness-script-mutation.html, select-selectedOptions-and-value.html, and select-validity.html. On 2026-09-15 in Chrome 152.0.0.0 / Windows NT 10.0, the selected tests passed 12/12 on wpt.live. Remaining directory coverage and other browsers remain open.Partial (12/12 pass)
AAMSelected and disabled option states in single / multiple selects, select exposure roles, and datalist input exposureChrome 152.0.0.0 / Windows 10 / 2026-09-15 / fixture ID forms-core-v1. In the idle AX tree, the single select was exposed as a labeled collapsed pop-up button and the multiple select as a list; selected and disabled option states were reflected. The datalist input was exposed as a combo box, but expanded suggestion options were not observed.Observed (idle AX tree)

This IMPL row records one Chrome DOM and form-API run. Until WPT results and AAM observations are available, the page does not register cross-browser implementation behavior inferred only from the specification.

Coverage / Open Issues

  • ReviewedOption meaning, categories, usage contexts, content model, and primary attributes
  • ReviewedLabel / value resolution, selected attribute versus selectedness, and disabled option / optgroup boundaries
  • ReviewedPrimary HTMLOptionElement IDL, the relationship to select form submission, and option inside datalist
  • OpenComparison outside the single Chrome run for selectedness initialization, attribute changes, option-list updates, disabled options, and FormData
  • OpenIndividual WPT results, complete HTML-AAM mappings, expanded datalist suggestions, and assistive-technology observations
  • OpenCustomizable select, the leading button, selectedcontent, extended option content models, historical changes, and compatibility

This is initial coverage. It records the reviewed scope; it does not claim identical rendering, interaction, or accessibility API results in every browser, or complete verification of the option element.

Related surface

For a beginner-friendly explanation of choices, display labels, submitted values, and selected / disabled options, see Yugien's option element page. The full selection model is covered by Atlas on select; shared form-submission rules by Atlas on form; and control labeling by Atlas on label.