SyntaxStudy
Sign Up
Home HTML Reference <select>

<select>

tag

Represents a control providing a menu of options.

Syntax

<select name="choice">\n <option value="a">Option A</option>\n</select>

Example

html
<label for="country">Country:</label>
<select id="country" name="country">
    <optgroup label="Europe">
        <option value="gb">United Kingdom</option>
        <option value="fr">France</option>
    </optgroup>
    <optgroup label="Americas">
        <option value="us">United States</option>
        <option value="ca">Canada</option>
    </optgroup>
</select>