Home > Web Front-end > HTML Tutorial > How to set html font color

How to set html font color

Release: 2020-03-03 11:05:28
Original
12326 people have browsed it

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:

How to set html font color

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:

How to set html font color

3. Add the "color" attribute within the braces. The attribute value is the text color. At this time The font is added with color:

How to set html font 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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template