How to define font color in css

王林
Release: 2020-11-30 17:10:08
Original
2735 people have browsed it

How to define font color in css: You can use the color attribute to customize the color of the font, such as [color:red;color:#00ff00;color:rgb(0,0,255)]. Reasonable matching of background color and text color can improve the readability of text.

How to define font color in css

The operating environment of this tutorial: Windows 10 system, CSS3, this article is applicable to all brands of computers.

Attribute introduction:

(Learning video sharing: java video tutorial)

The Color attribute specifies the color of the text.

How to define font color in css

Tip: A reasonable combination of background color and text color can improve the readability of the text.

Example:

body {
    color:red;
}
h1 {
    color:#00ff00;
}
p {
    color:rgb(0,0,255);
}
Copy after login

Related recommendations:CSS tutorial

The above is the detailed content of How to define font color in css. 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