HTML Tag
Example
A selection list with four options:
<select>
<option>沃尔沃</option>
<option>萨博</option>
<option>奔驰</option>
<option>奥迪</option>
</select> Copy after login
Definition and usage
must be placed in the element.
Browser support
IE Firefox Chrome Safari Opera
All major browsers support the tag.
Differences between HTML and XHTML
In HTML, the element does not require a closing tag.
In XHTML, the tag must end correctly.
Tips and Notes
Tips: When the selection list is very long, you can use the tag to gather related options to form an option group.
OptionalAttributes
The DTD column indicates which document types support this attribute. S=Strict, T=Transitional, F=Frameset .
[The lable attribute is not supported in some browsers, such as firefox]
[The value attribute is required when submitting a form in the firefox browser. Specify, even if there is no need to submit data, value="" should be specified for it, otherwise an exception will be thrown during JSPdevelopment 】
Core attributes
The tag supports the following core properties:
##EventsProperties
The tag supports the following events Attribute:
Example
Using the label attribute in the element:
<select>
<option label="Volvo">沃尔沃(拉丁语“向前滚”的意思)</option>
<option label="Saab">萨博(“瑞典飞机有限公司”的意思)</option>
</select> Copy after login
Definition and usage
## The label attribute of the # tag is used to define a short description of an option.
The short description will appear in the
drop-down list
. Only IE 7 and above support the label attribute of the label.
Grammar
<option label="value"> Copy after login
The above is the detailed content of Detailed explanation of tag in html. For more information, please follow other related articles on the PHP Chinese website!