<select>

The select element presents a dropdown list of options for the user to choose from.

Since HTML 2.0 Spec ↗

Syntax

<select name="field">...</select>

Examples

<label for="size">Size</label>
<select id="size" name="size">
  <option value="">Choose...</option>
  <option value="s">Small</option>
  <option value="l" selected>Large</option>
</select>
Output
Renders a dropdown defaulting to "Large" with three selectable options.

Notes

Add the multiple attribute for multi-select, size to show several rows at once, and group choices with <optgroup>. The first option is selected by default unless selected is set elsewhere.

Browser & runtime support

EnvironmentSince version
chrome 1.0
firefox 1.0
safari 1.0
edge 12

See also