How to use html option tag

藏色散人
Release: 2019-05-27 13:47:02
Original
5181 people have browsed it

html The option tag is used to define an option (an item) in the drop-down list. The

How to use html option tag

html How to use the option tag?

Function: Define an option (an item) in the drop-down list.

Description: The browser displays the content in the

The option element is located inside the select element.

Note:

html option tag example 1

<!DOCTYPE html>
<html>
<body>
<select>
    <option>peter_zhu</option>
    <option>西门大官人</option>
    <option>灭绝师太</option>
    <option>无忌哥哥</option>
</select>
</body>
</html>
Copy after login

Effect:

How to use html option tag

##Example 2

<!DOCTYPE html>
<html>
<body>
<select>
    <option>peter_zhu</option>
    <option>西门大官人</option>
    <option>灭绝师太</option>
    <option>无忌哥哥</option>
</select>
<p>option标签用于下拉列表中的元素</p>
</body>
</html>
Copy after login
Effect:


How to use html option tag

The above is the detailed content of How to use html option tag. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template