<option> HTML Tag

Element of
HTML Lists
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.

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 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.

Claire is seasoned technical writer, editor and HTML enthusiast.

Browser Support for option