Font content"; the color attribute can specify the color of the font text, The font-size attribute sets the font size."/> Font content"; the color attribute can specify the color of the font text, The font-size attribute sets the font size.">

Home  >  Article  >  Web Front-end  >  What is the code to change font color and size in html

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

青灯夜游
青灯夜游Original
2022-01-21 16:20:3250850browse

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



	
		
	

	
		

测试文本,默认字体颜色

测试文本,字体颜色设置为红色

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



	
		
	

	
		

测试文本,默认字体大小

测试文本,字体大小设置为20px

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!

Statement:
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