Home  >  Article  >  Web Front-end  >  How to use html option tag

How to use html option tag

藏色散人
藏色散人Original
2019-05-27 13:47:025121browse

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>

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>

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!

Statement:
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
Previous article:How to use html pre tagNext article:How to use html pre tag