WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML <option> Tag


Example

A drop-down list with four options:

<select>
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="opel">Opel</option>
  <option value="audi">Audi</option>
</select>
Try it yourself »

Definition and Usage

The <option> tag defines an option in a select list.

<option> elements go inside a <select> or <datalist> element.


Browser Support

Element
<option> Yes Yes Yes Yes Yes Yes

tag.


Attributes

Attribute Value Description
disabled disabled Specifies that an option should be disabled
label text Specifies a shorter label for an option
selected selected Specifies that an option should be pre-selected when the page loads
value text Specifies the value to be sent to a server


Default CSS Settings

None.