Home > Web Front-end > HTML Tutorial > How to make HTML drop-down menu text smaller

How to make HTML drop-down menu text smaller

青灯夜游
Release: 2022-01-21 14:06:57
Original
4080 people have browsed it

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.

How to make HTML drop-down menu text smaller

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>
Copy after login

How to make HTML drop-down menu text smaller

Make the drop-down menu text smaller

select {
	font-size: 10px;
}
Copy after login

How to make HTML drop-down menu text smaller

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!

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