What is the code to change font color and size in html

青灯夜游
Release: 2022-01-21 16:20:32
Original
50931 people have browsed it

The code to change the font color and size in html is "Font contentname>" ;The color attribute can specify the color of the font text, and the font-size attribute can set the font size.

What is the code to change font color and size in html

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

Change the font color in html

In html, if you want to change the font color, you can use the color attribute

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
	</head>

	<body>
		<p>测试文本,默认字体颜色</p>
		<p style="color: red;">测试文本,字体颜色设置为红色</p>
	</body>

</html>
Copy after login

What is the code to change font color and size in html

Changing the font size in html

In html, if you want to change the font color, you can use the font-size attribute

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
	</head>

	<body>
		<p>测试文本,默认字体大小</p>
		<p style="font-size: 20px;">测试文本,字体大小设置为20px</p>
	</body>

</html>
Copy after login

What is the code to change font color and size in html

Related recommendations: "html video tutorial"

The above is the detailed content of What is the code to change font color and size in html. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!