<option> HTML Tag
Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
- Element of
- Lists Bring Order To Web Pages: Here’s The HTML Code To Create Them
- What does
<option> HTML Tag
do? - The <option> element is used in conjunction with the <select> element to create a drop-down menu in a web form. Each <option> element is displayed as an available option in the resulting drop-down menu.
- Display
- inline
- Usage
- semantic
Code Example
<p><strong>Select your favorite species of flamingo.</strong></p>
<select name="favorites">
<option value="American">American flamingo</option>
<option value="Greater">Greater flamingo</option>
<option value="Lesser">Lesser flamingo</option>
<option selected value="Andean">Andean flamingo</option>
<option value="Chilean">Chilean flamingo</option>
<option value="James's">James's flamingo</option>
</select>
Select your favorite species of flamingo.
Defining List Options
The <option>
element is used to define options in a drop-down list. If your list contains a large number of options, consider splitting it into labelled groups using the <optgroup>
element.
Browser Support for option
All | All | All | All | All | All |