Pair the list with a <label>. Use value for the data you submit, selected for the default choice, and disabled for unavailable items.
Baseline · Widely available.
Core <option> support has been stable across browsers since about July 2015 (and much earlier in practice).
Deprecated · Obsolete attribute.
Do not use name on <option>. Put name on the <select> instead.
Syntax
HTML Syntax
syntax.html
<option value="data">label</option>
The start tag is required. The end tag may be omitted in some cases, but writing both tags is clearer for beginners. In a classic <select>, option content is text only.
Reference
Attributes
The attributes you will use most often on <option>:
Set the group label — it is a heading, not a selectable value.
Keep real choices as <option> inside each group.
Still name the <select> so the chosen option value is submitted.
Edge Cases & Pitfalls
Most option bugs are missing values, missing labels, or orphan options outside a select.
structure
Needs a parent list
<option> belongs in <select>, <optgroup>, or <datalist> — not alone in the body.
forms
name goes on select
Do not put obsolete name on option. The select’s name plus the option’s value make the submitted pair.
selected
One selected (usually)
Without multiple on select, only one option should have selected.
a11y
Label the select
Associate a visible <label> with the select. Placeholder-style first options are not a full label substitute.
style
Limited option CSS
Styling option menus is historically limited and OS-dependent. Prefer clear text over fancy option colors.
Compatibility
Browser Support
The <option> element is core HTML form UI in every browser. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
<option>
Widely available since about July 2015 (and long before). Chrome, Firefox, Safari, Edge, and Opera fully support option in select, optgroup, and datalist.
98%Global support (approx.)
Google ChromeAll
Full support
Mozilla FirefoxAll
Full support
Apple SafariAll
Full support
Microsoft EdgeAll
Full support
OperaAll
Full support
Samsung InternetAll
Full support
Internet ExplorerAll
Supported
<option>Widely supported
Bottom line: Safe everywhere for classic select lists. Always label the select and give options clear values.
Remember
Key Takeaways
Role:<option> is one selectable item in a list control.
Submit:value on the option + name on the select.
Defaults:selected for the starting choice; disabled to block one.
Access: always label the parent <select>.
One line: each <option> is a labeled choice whose value rides with the select’s name.
UA style
Default CSS Settings
Option appearance is largely controlled by the OS and browser. A simple idea of the element:
default.css
option {
/* display and colors are often OS-native */
}
Prefer readable labels over heavy option styling. Focus styles belong on the select control.
Frequently Asked Questions
The option element defines one choice inside a select dropdown, an optgroup group, or a datalist. The selected option’s value is what gets submitted with the form.
As a child of select, optgroup (inside select), or datalist. Do not place option alone in the page body.
The submitted value becomes the option’s text content. Prefer an explicit value when the code you send should differ from the label users see.
In a normal select, only one option may have selected. With select multiple, several options can be selected at once.
A disabled option cannot be chosen. Browsers usually gray it out. An option can also be unusable if its parent optgroup is disabled.
No. name on option is obsolete. Put name on the select (or use the form control’s name), and use id when you need an element identifier.