How to set the font color in css: first create an HTML sample file; then define some text content in the body; finally set the font color through the "p{color:blue}" attribute.
The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.
How to set font color in css?
In html, we often use css styles to beautify some shortcomings of html tags. Today we will talk about how to use the basic styles of css to change the color of text. The article is easy to understand. I hope After reading it, everyone can practice to deepen their impression.
First of all, let’s show you the basic code of the html font:
<!doctype html> <html> <head> <meta charset="utf-8"> <title>HTML中文网</title> </head> <body> <p>字体颜色设置</p> <p>字体颜色设置</p> <p>字体颜色设置</p> <p>字体颜色设置</p> </body> </html>
Here are the four paragraphs of the p tag, which we should all be able to understand. , which is the simplest code style.
Next we need to set the html font color. Let’s take a look at the css style code:
<style type="text/css"> p{color: blue} </style>
The effect is as follows:
css video tutorial】
The above is the detailed content of How to set font color in css. For more information, please follow other related articles on the PHP Chinese website!