**`<option>`** must be nested inside a `<select>` (or `<datalist>`). Its **`value`** attribute is what actually gets submitted with the form — if omitted, the option's visible text content is used as the value instead. The **`selected`** attribute pre-selects that option when the page loads, and **`disabled`** makes a specific choice visible but unpickable (useful for a 'currently unavailable' option).
1Understanding <option>
`<option>` must be nested inside a <select> (or <datalist>). Its `value` attribute is what actually gets submitted with the form — if omitted, the option's visible text content is used as the value instead. The `selected` attribute pre-selects that option when the page loads, and `disabled` makes a specific choice visible but unpickable (useful for a 'currently unavailable' option).
If value is omitted, the browser submits the option's TEXT content as the value — this can silently cause bugs if your visible label text isn't a clean machine-readable value (e.g. 'United States (US)' submitted literally instead of a code like 'us').
<select name="plan">
<option value="free" selected>Free</option>
<option value="pro">Pro</option>
<option value="enterprise" disabled>Enterprise (contact sales)</option>
</select>2Practical Example
Here is a real-world application of <option> showing how it is used in production HTML.
<!-- Options as suggestions inside a datalist instead of a select -->
<input list="browsers" name="browser">
<datalist id="browsers">
<option value="Chrome"></option>
<option value="Firefox"></option>
</datalist>3Best Practices
Follow these guidelines when working with <option>:
1. Always set an explicit value, rather than relying on the visible text being submitted
2. Use selected to set a sensible default choice
3. Use disabled for a valid-but-currently-unavailable option, keeping it visible for context
Tip: If value is omitted, the browser submits the option's TEXT content as the value — this can silently cause bugs if your visible label text isn't a clean machine-readable value (e.g. 'United States (US)' submitted literally instead of a code like 'us').
<select name="plan">
<option value="free" selected>Free</option>
<option value="pro">Pro</option>
<option value="enterprise" disabled>Enterprise (contact sales)</option>
</select>