Question: How to change font color and size in HTML? Steps: Font color: Set the font color using the tag or the CSS color property. Font size: Use the tag to set the font size (1-7), or use the CSS font-size property to set a pixel or relative size.
Modify font color and size in HTML
Change font color
Set the font color using thetag:
这是红色的文本
You can use thecolor
property of CSS instead of thetag :
这是红色的文本
Change font size
Use thetag to set the font size:
这是5号字体
where, the size value Can range from 1 to 7, where 1 is the smallest and 7 is the largest.
You can also use thefont-size
property of CSS to set the font size:
这是20像素的字体
Note:
tag is deprecated as it is obsolete in modern HTML standards. It is recommended to use CSS.
tag has been removed from HTML5.The above is the detailed content of How to change font color size in html. For more information, please follow other related articles on the PHP Chinese website!