Home > Article > Web Front-end > How to make HTML drop-down menu text smaller
In HTML, you can use the font-size attribute to make the text of the drop-down menu smaller. The function of this attribute is to set the font size. You only need to add "font-size: value px;" to the drop-down menu element. "Style is enough.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
Create a drop-down menu in html
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <select id="select"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="opel">Opel</option> <option value="audi">Audi</option> </select> </body> </html>
Make the drop-down menu text smaller
select { font-size: 10px; }
Related recommendations: "html video tutorial"
The above is the detailed content of How to make HTML drop-down menu text smaller. For more information, please follow other related articles on the PHP Chinese website!