Home >Web Front-end >CSS Tutorial >How to set font color in HTML
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
ec45414ec590617c2b5ecb9bce6858acMy color is blue Color16b28748ea4df4d9c2150843fecfba68
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?
How to use the 1aa9e5d373740b65a0cc8f0a02150c53 tag of html
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!