Skip to content

<option> - The Option Element

Form Control HTML 2.0

The option element defines individual choices within a <select> dropdown menu or <datalist> element. Each option represents a selectable value.

Result
<select name="field">
<option value="value">Display Text</option>
</select>

The value attribute defines what gets submitted with the form, while the text content is what users see.

AttributeDescriptionExample
valueValue submitted with formvalue="option1"
selectedPre-selects the optionselected
disabledDisables the optiondisabled
labelAlternative display textlabel="Short"
Result
Result
Result

Options with Different Values and Display Text

Section titled “Options with Different Values and Display Text”
Result
Result
Result
Result
Result
Result
Result
Result
Result
<select name="status">
<option value="active">Active</option>
<option value="pending">Pending</option>
<option value="inactive">Inactive</option>
</select>
<select name="country" required>
<option value="">Please select a country</option>
<option value="us">United States</option>
<option value="uk">United Kingdom</option>
</select>

Consider alphabetical, chronological, or frequency-based ordering:

Result
<select name="choice" required>
<option value="">-- Select --</option>
<option value="a">Option A</option>
<option value="b">Option B</option>
</select>

Disabled selected options can confuse screen readers.

Long option text can be difficult to read and scan:

<option value="express">Express Shipping (2-3 days)</option>
BrowserVersionNotes
Chrome1+Full support
Firefox1+Full support
Safari1+Full support
Edge12+Full support
IE3+Full support

The <option> element has been supported since the earliest browsers.