HTML <option> Tag


The <option> HTML element defines individual items in the list created using the <select> container. The width of the list is determined by the widest text specified in the <option> , and can also be changed using styles. If you plan to send list data to the server, you need to place the <select> element inside the form. This is also necessary when the list data is accessed through scripts.


Permitted Parents
A <select>, an <optgroup> or a <datalist> element
Start/End Tags
Start tag: optional, End tag: optional


<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

Browser Support

The following table will show you the current browser support for the HTML <option> tag.

Edge Chrome Firefox Opera Safari
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview

Last updated by CSSPortal on: 30th March 2024