description & Usage
For anthology of an option in the relevant list, they use <option> tag.
The tags in which option can be used are:
- <optgroup> tag.
- <datalist> tag.
- <select> tag.
Notes
Note: The <option> tag does not need any attribute, but to send the form data to the server, you need to use the value attribute.
Note: If you have trouble grouping the list options, you can easily get help from the <optgroup> tag.
Browser compatibility and Support
| # | Chrome | Edge | Firefox | Safari | Opera |
|---|---|---|---|---|---|
| <option> |
Attributes
| Attributes | Values | Description |
|---|---|---|
| disabled |
disabled
|
en |
| label |
text
|
en |
| selected |
selected
|
en |
| value |
text
|
en |
Global Attributes
The option tag supports the HTML Global Attributes.
Event Attributes
The option tag supports the HTML Event Attributes.