Home > Article > Web Front-end > How to use html option tag
html The option tag is used to define an option (an item) in the drop-down list. The
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:
##Example 2
<!DOCTYPE html> <html> <body> <select> <option>peter_zhu</option> <option>西门大官人</option> <option>灭绝师太</option> <option>无忌哥哥</option> </select> <p>option标签用于下拉列表中的元素</p> </body> </html>Effect:
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!