**`<select>`** presents a closed set of choices as `<option>` children, rendered as a native dropdown by the browser. Adding the **`multiple`** attribute turns it into a multi-select list (usually rendered as a scrollable box instead of a dropdown) where users can pick several options at once (typically via Ctrl/Cmd+click). Use `<optgroup>` inside a `<select>` to visually group related options under a label.
1Understanding <select>
`<select>` presents a closed set of choices as <option> children, rendered as a native dropdown by the browser. Adding the `multiple` attribute turns it into a multi-select list (usually rendered as a scrollable box instead of a dropdown) where users can pick several options at once (typically via Ctrl/Cmd+click). Use <optgroup> inside a <select> to visually group related options under a label.
A native <select> automatically gets keyboard support (arrow keys, type-ahead-to-jump-to-an-option) and correct mobile rendering for free — recreating that yourself with styled <div>s is a lot of extra work to match the same accessibility.
<label for="lang">Language</label>
<select id="lang" name="lang">
<option value="en">English</option>
<option value="es">Spanish</option>
<option value="fr">French</option>
</select>2Practical Example
Here is a real-world application of <select> showing how it is used in production HTML.
<!-- Multi-select list -->
<select name="skills" multiple size="4">
<option value="html">HTML</option>
<option value="css">CSS</option>
<option value="js">JavaScript</option>
</select>3Best Practices
Follow these guidelines when working with <select>:
1. Use <select> when the user must choose from a fixed, known set of options
2. Add the multiple attribute only when picking more than one option genuinely makes sense
3. Group related options with <optgroup> in long dropdowns for easier scanning
Tip: A native <select> automatically gets keyboard support (arrow keys, type-ahead-to-jump-to-an-option) and correct mobile rendering for free — recreating that yourself with styled <div>s is a lot of extra work to match the same accessibility.
<label for="lang">Language</label>
<select id="lang" name="lang">
<option value="en">English</option>
<option value="es">Spanish</option>
<option value="fr">French</option>
</select>