, where color-value can be a color name, a hexadecimal color code, or an RGB color code. For example, to make paragraph text red:
Paragraph text
.">To set the font color in HTML, use the color attribute. Syntax:
, where color-value can be a color name, a hexadecimal color code, or an RGB color code. For example, to make paragraph text red: Paragraph text
.
How to set the font color in HTML
Setting the font color in HTML is very simple, just usecolor
Attributes are enough.
Syntax:
Where:
is the HTML element to set the font color, for example
,
or
.
color-valueis the font color value to be set, it can be:
Example:
To set the font color of all text in a paragraph to red, you can use the following code:段落文本
标题文本
Note:
The above is the detailed content of How to set the font color of html. For more information, please follow other related articles on the PHP Chinese website!