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.
<option value="value">Display Text</option>
The value attribute defines what gets submitted with the form, while the text content is what users see.
| Attribute | Description | Example |
|---|
value | Value submitted with form | value="option1" |
selected | Pre-selects the option | selected |
disabled | Disables the option | disabled |
label | Alternative display text | label="Short" |
<option value="active">Active</option>
<option value="pending">Pending</option>
<option value="inactive">Inactive</option>
<option value="1">Active</option>
<option value="2">Pending</option>
<option value="3">Inactive</option>
<select name="country" required>
<option value="">Please select a country</option>
<option value="us">United States</option>
<option value="uk">United Kingdom</option>
<select name="country" required>
<option value="us">United States</option>
<option value="uk">United Kingdom</option>
Consider alphabetical, chronological, or frequency-based ordering:
<select name="choice" required>
<option value="">-- Select --</option>
<option value="a">Option A</option>
<option value="b">Option B</option>
<select name="choice" required>
<option value="" disabled selected>-- Select --</option>
<option value="a">Option A</option>
<option value="b">Option B</option>
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>
<option value="express">Express Shipping - Delivered within 2-3 business days, tracking included, signature required</option>
| Browser | Version | Notes |
|---|
| Chrome | 1+ | Full support |
| Firefox | 1+ | Full support |
| Safari | 1+ | Full support |
| Edge | 12+ | Full support |
| IE | 3+ | Full support |
The <option> element has been supported since the earliest browsers.