You are here: Reference > CSS > properties > color

color property

Browser support:
Specifies the color of the element's text content.
JavaScript page for this property: color. You can find other example(s) there.

Possible values:

 One of the following values: 
Color of the text content. For the supported color values, see the colors page.
Takes the value of this property from the computed style of the parent element.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the color property:
        .example1 {
            color: #9AEECC;
        .example2 {
            color: #CCEE55;
    <h1 class="example1">text with color #9AEECC</h1>
    <h2 class="example2">text with color #CCEE55</h2>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content