Home > Web Front-end > CSS Tutorial > How to set font color in HTML

How to set font color in HTML

php中世界最好的语言
Release: 2017-11-23 10:36:08
Original
3535 people have browsed it

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>
Copy after login

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>
Copy after login

2. Body page content code

My color is blue Color

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

tag of html

HTML drop-down menu code

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!

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