Home >Web Front-end >HTML Tutorial >How to set the value of select in html
In html, you need to use the option tag to set the value of select. The option tag defines an option in the drop-down list; the browser displays the content in the option tag as a menu of the select tag or an element in the scrolling list.
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer. The
select element creates a single-select or multiple-select menu.
The
option element defines an option (an entry) in a drop-down list.
The browser displays the content in the
The option element is located inside the select element.
Example: Set the value of select
<!DOCTYPE html> <html> <body> <select> <option>Volvo</option> <option>Saab</option> <option>Mercedes</option> <option>Audi</option> </select> </body> </html>
Rendering:
Recommended tutorial: " html video tutorial》
The above is the detailed content of How to set the value of select in html. For more information, please follow other related articles on the PHP Chinese website!