HTML Tag
##All browsers support the
tag.
definition and usage (Recommended Learning: HTML Tutorial )
Option Element Define one option (one entry) in the drop -down list.
The browser displays the content in the tag as a menu or an element in the scrolling list of the tag.
The option element is located inside the select element.
Differences between HTML and XHTML
In HTML, does not have a closing tag.
In XHTML, must be properly closed.
Tip
Note: tags can be used without any attributes, but you usually need to use value Property that indicates the content being sent to the server.
Note: Please use this tag in conjunction with the select element, otherwise this tag is meaningless.
Tips: If there are many options in the list, you can use the tag to combine related options.
Example
Create a select list with 4 options:
<!DOCTYPE html>
<html>
<body>
<select>
<option>Volvo</option>
<option>Saab</option>
<option>Mercedes</option>
<option>Audi</option>
</select>
</body>
</html> Copy after login
The above is the detailed content of Where is the HTML tag used?. For more information, please follow other related articles on the PHP Chinese website!