Get the App
SLTechnology News&Howtos  ›  Development  › 

How css changes the color of html fonts

Shulou Source: shulou.com Published: 2022-06-01 07:36:33 10月02日 Update

This article is about how css changes the color of html fonts. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Font color code:

Color

1. Tamper with div font color

.divys {color:#F00}

My font color is blood # F00

2. Tampering with html p font color collection

.abc p {color:#000}

.bbb {color:#F00}

My font color # 000 black

My color is red # F00

3. Reverse the color of html span font

.ccc span {color:#999}

In the form paragraph, my span color collection in div is # 999. another mode

4. Change the color of html em font

.ddd span {color:#090}

Content paragraph my em tone in div is # 090 green in addition to the content

The above are CSS and HTML codes, parting to change the font hue of div, p, em, span in html.

Thank you for reading! This is the end of this article on "how css changes the color of html fonts". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Tags: Font color content code more paragraph article color hue for good practical form article pattern look knowledge red green blood Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia vpn OPPO Reno Apple Shulou Tech Info