Home >Web Front-end >CSS Tutorial >How to adjust font color in css
The method to adjust the font color in css is: you can use the color attribute to set the font color, such as [color: #92a8d1;] or [color:rgb(255,0,51)].
The operating environment of this article: windows10 system, css 3, thinkpad t480 computer.
It is very simple to set the color of the font. CSS provides us with the color attribute, using which we can adjust the color of the font at will.
Attribute introduction:
The Color property specifies the color of the text.
Attribute value:
The name of the color The name of the color, such as red, blue, brown, lightseagreen, etc., is not case sensitive
Hexadecimal Hexadecimal symbols #RRGGBB and #RGB (such as #ff0000)
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php.cn</title> <style> body {color: #92a8d1;} </style> </head> <body> <h1>这是标题</h1> <p>段落文本的颜色为 16 进制值。</p> </body> </html>Running result:
css video tutorial)
Example 2:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>php.cn</title> <style> body {color: rgb(255,0,51);} </style> </head> <body> <h1>这是标题</h1> <p>段落文本的颜色为 16 进制值。</p> </body> </html>Running results:
The above is the detailed content of How to adjust font color in css. For more information, please follow other related articles on the PHP Chinese website!