HTML: select
The <select> element lets users choose one or more values from a predefined list of options.
What you will learn
- How to connect a label and options to a select
- How single and multiple selection differ
- When radio buttons or another control may be clearer
Minimal example
<label for="country">Country</label>
<select id="country" name="country" required>
<option value="">Choose a country</option>
<option value="jp">Japan</option>
<option value="us">United States</option>
</select>Each <option> has a submitted value and visible text. A disabled placeholder with an empty value can prompt a required choice without becoming a valid selection.
Common mistakes
- Do not rely on visible text alone; choose stable values for submitted data.
- Use
multipleonly when selecting several values is genuinely useful and explain how to operate it. - Validate the submitted value against allowed choices on the server.