A drop-down list with four options:
![]()
The <option> tag is supported in all major browsers.
The <option> tag defines an option in a select list.
The <option> element goes inside a <select> or <datalist> element.
In HTML5, the <option> element is also used in the new <datalist> element.
Note: The <option> tag can be used without any attributes, but you usually need the value attribute, which indicates what is sent to the server.
Note: Use this tag in conjunction with <select> or <datalist> elements, elsewhere it is meaningless.
| 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 |
The <option> tag also supports the Global Attributes in HTML5.
The <option> tag also supports the Event Attributes in HTML5.
| WEB HOSTING |
|---|
| Best Web Hosting |
| PHP MySQL Hosting |
| Best Hosting Coupons |
| UK Reseller Hosting |
| Cloud Hosting |
| Top Web Hosting |
| $7.95/mo SEO Hosting |
| Premium Website Design |
| WEB BUILDING |
|---|
| Download XML Editor |
| FREE Website BUILDER |
| Free Website Templates Free CSS Templates |
| Make Your Own Website |
| W3SCHOOLS EXAMS |
|---|
|
Get Certified in: HTML, CSS, JavaScript, XML, PHP, and ASP |
| W3SCHOOLS BOOKS |
|---|
|
New Books: HTML, CSS JavaScript, and Ajax |
| STATISTICS |
|---|
|
Browser Statistics Browser OS Browser Display |
| SHARE THIS PAGE |
|---|