Home > Article > Web Front-end > How to set html font color
#htmlYou can use the "color" attribute to set the font color.
Recommended learning: html introductory tutorial
1. Create a new html document, add a p tag to the body tag, and then add some text to the p tag:
2. Add the style tag in the head tag. The style tag is used to add styles to the elements, and then add "p{ }" in the style tag, where p refers to Set the style for all p tags. Fill in the style content within the braces:
3. Add the "color" attribute within the braces. The attribute value is the text color. At this time The font is added with color:
PHP Chinese website, a large number of PHP tutorials and website construction tutorials, welcome to learn!
The above is the detailed content of How to set html font color. For more information, please follow other related articles on the PHP Chinese website!