Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS text-decoration-color property

CSS text-decoration-color property

CSS Reference Manual CSS Reference Manual

Example

Change the color of the underline in underlined text:

p

{

text-decoration: underline;

text-decoration-color: red;

-moz-text-decoration-color: red; /* Code for Firefox */

}

Try it »


Browser support

Internet Explorer Firefox Opera Google Chrome Safari

Almost no major browsers support the text-decoration-color property.

Firefox supports an alternative to this property, namely the -moz-text-decoration-color property.


Definition and Usage

The text-decoration-color property specifies the color of text decorations (underline, overline, line-through).

**Note:** The text-decoration-color property takes effect only on elements with a visible text-decoration.

Default value: currentColor
Inherited: No
Animatable: Yes. See Animatable. Try it
Version: CSS3
JavaScript syntax: object.style.textDecorationColor="red" Try it

CSS Syntax

text-decoration-color:

color

|initial|inherit;

Attribute values

Value Description Testing
color Specifies the color of the text decoration. Test »
initial Sets this property to its default value. See initial. Test »
inherit Inherits this property from its parent element. See inherit.

CSS Reference Manual CSS Reference Manual