English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

CSS Reference Manual

CSS @rules (RULES)

Complete List of CSS Properties

CSS3 text-decoration-color property usage and examples

text-decoration-The color CSS property specifies the color set on the elementtext-decoration-line(underline, line break, line break) color.

The following table provides usage instructions and version history of this property, as well as its usage syntax in JavaScript scripts.

Default value:colorThe current element
Applies to:All elements. It also applies to::first-letter and::first-line
Inheritance:None
Animatable:Yes.Please refer to Animation properties.
Version: CSS3new features
JavaScript syntax:object.style.textDecorationColor="green"

text-decoration-The syntax of color

The syntax of this property is as follows:

text-decoration-color: color | initial | inherit

The following examples demonstrate how to use text-decoration-color property.

p {
    text-decoration: underline;
    -moz-text-decoration-color: red; /* Firefox */
    text-decoration-color: red; 
}
Test and see‹/›

Property values

The following table describes the values of this property.

ValueDescription
colorSpecifytext-decoration-lineThe color.CSS color values,To learn more about valid color values.
initialSet this property to its default value.
inheritIf specified, the associated element adopts its parent element text-decoration-Property values of color.

Browser compatibility

text-decoration-Most browsers do not support this property.

  • Firefox6+ -moz-,36+

  • Google Chrome×

  • Internet Explorer ×

  • Apple Safari ×

  • Opera ×

Warning:text-decoration-Warning: Most browsers currently do not support this property. It is best to avoid using this property.

Read more

Please refer to the following tutorial:CSS text,CSS color,CSS border.

Related properties:text-decoration,text-decoration-line,text-decoration-style.