HTML font color can be adjusted through CSS properties. Method: use the color attribute. Color values can be hexadecimal values, RGB values, RGBA values, or color names. For example: color: #FF0000; sets the red font; color: rgb(255, 0, 0); also sets the red font.
How to adjust the font color in HTML
In HTML, you can adjust the font color through CSS properties. You can use thecolor
attribute.
Syntax:
color: [颜色值];
Color value:
Color value can be in one of the following formats:
Usage example:
To set the font color of all text in a paragraph to red, you can use the following code:
这是红色的文本。
To set the font color of a specific word to blue, you can use the following code:
这是 蓝色的 单词。
Note:
The above is the detailed content of How to adjust font color in html. For more information, please follow other related articles on the PHP Chinese website!