When building a website, you definitely want to make the content of your website colorful, so you may need to change the black font. How to set the font color of the web page? Today I will give you a brief introduction.
DIV font color DIV text color setting article
Use css style words: color
Setting font color within div tag
DIV Set the font text color within the tag using the style attributeSet CSS color
<div style="color:#F00">我颜色为红色</div>
Set the font text color outside the div
External CSS sets the font color inside the DIV to blue
1. CSS code in the head tag
<style> .abc{ color:#00F} </style>
2. Body page content code
There are so many font color settings in HTML. For more exciting information, please pay attention to php Chinese websiteOther related articles!
Related reading:
Why do we need to set CSS styles for DIV?
The above is the detailed content of How to set font color in HTML. For more information, please follow other related articles on the PHP Chinese website!