The best HTML <option> tag Tutorial In 2024, In this tutorial you can learn Examples,Browser Support,Tag definitions and instructions,Tips and Notes,Attributes,Global Properties,Event Properties,
Create a select list with four options:
Most major browsers support <option> tag.
The <option> tag defines a drop-down list of options (one entry).
<option> tag contents as a <select> or <datalist> element to use.
NOTE: <option> tag may be the case without the use of any property, but you usually need to use the value property, which will be sent to the server indicates the content.
Note: Please select the element with the use of this label, otherwise the label is meaningless.
Tip: If you list a lot of options, you can use <optgroup> tag of the related options can be combined.
属性 | 值 | 描述 |
---|---|---|
disabled | disabled | 规定此选项应在首次加载时被禁用。 |
label | text | 定义当使用 <optgroup> 时所使用的标注。 |
selected | selected | 规定选项(在首次显示在列表中时)表现为选中状态。 |
value | text | 定义送往服务器的选项值。 |
<option> tag supports the global attributes, view complete the property sheet HTML Global Attributes .
<option> tag supports all HTML event attributes .