This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

text-decoration-color

Summary

Sets the color of any text decoration, such as underlines, overlines, and strike throughs.

Overview table

Initial value
currentColor
Applies to
All elements
Inherited
No
Media
visual
Computed value
The computed color
Animatable
Yes
CSS Object Model Property
textDecorationColor

Syntax

  • text-decoration-color: color

Values

color
The color data type value can be a named color keyword, or in hexadecimal, RGB, RGBa, HSL or HSLa notation. See the CSS color values page for more details.

Examples

Example using the text-decoration-color

.text-decoration-color {
  text-decoration: line-through;
  text-decoration-color: lime;
}

.text-decoration-color:hover {
  text-decoration: underline;
  text-decoration-color: #ff0;
}

View live example

Related specifications

CSS Text Decoration Module Level 3
W3C Candidate Recommendation

Attributions

  • Mozilla Developer Network cc-by-sa-small-wpd.svg: Article

  • Microsoft Developer Network: Article