The <option> tag is used in conjunction with the <select> tag and is used for defining option items within the select list. The selected information is sent to the server as a set of the name given by the name attribute and the value of the selected value attribute.

Example Code:
  <option value ="new york">New York</option>
  <option value ="london">London</option>
  <option value ="sydney" selected>Sydney</option>
  <option value ="auckland">Auckland</option>
Attribute Definition
selected Specifies that this option will be pre-selected when the user first loads the page.
value Specifies the initial value of the option item.
label Specifies a label to be used as an alternative to the option item's contents. Useful if you'd prefer a shorter, more concise label.
disabled Disables the input control. The button won't accept changes from the user. It also cannot receive focus and will be skipped when tabbing.
Global Attributes:

The <option> tag also supports the Global Attributes in HTML5

Event Attributes:

The <option> tag also supports the Event Attributes in HTML5

Last updated on 2 August 2018 By Rene Spronk

View All HTML Tags

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.