The CSS Color Attribute

Set this attribute using the syntax color:value to determine the color of text rendered in an HTML element. Some browsers also use this setting for radio buttons etc. The value should be either a safe CSS color name or a hexadecimal value, as discussed here.

This is an inherited property - i.e. in a child element, if not assigned, it takes the corresponding value from the containing parent.

This attribute can also be assigned the setting inherit which causes it to pick up its value from the parent element.

Jump To...

Colophon