Home  >  Article  >  Web Front-end  >  How to define font color in css

How to define font color in css

王林
王林Original
2020-11-11 16:32:422733browse

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);
}

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!

Statement:
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
Previous article:css web page layout tipsNext article:css web page layout tips