The <option>
element
A single item in a drop-down <select>
menu.
Full list of attributes
All the usual HTML global attributes are available
disabled
- If present, the browser won't allow the user to select this option, although it will still be displayed (probably greyed-out).
label
- The text that should be shown to the user for this item. This might be different from the value, for example a recognizable name when the value is an arbitrary code number. If this attribute isn't used, then the browser will use the content of the
<option>
element as the label instead. selected
- Should be present in the option which is currently selected.
value
- The text that should be used as the value of the
<select>
element when the form is submitted, if this option is the one chosen.