CSS Color

color

Used to set the foreground color (font color).

 

Default color: black

HTML snippet:

<div>
Hello world! This is a sample text
</div>

CSS snippet:

div{
background-color : #e1e1e1;
color : #dd4b39;
}

Output:

The color of the font will be changed to red color.

Posted on July 22, 2014 in CSS

Share the Story

Leave a reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Back to Top