CSS text-decoration-color Property Tutorial

In this section, we will learn what the text-decoration-color property is and how to use it in CSS.

CSS text-decoration-color Property Definition and Usage

In the `text-decoration-line` property section, we’ve mentioned that we can decorate a text content by adding a line to it.

By default, the color of this line is the same as the color of the text content of the element.

But with the help of text-decoration-color property, we can set another color for the created line.

CSS text-decoration-color Property Syntax

text-decoration-color: color-value;

CSS text-decoration-color Property Value

The value we set for this property is the color we want the target line to take on.

The value set for this property can be “named-colors”, RGB, HSL and HEX, RGBA and HSLA values.

Example: text-decoration-color in CSS

See the Pen text-decoration-color in CSS by Enjoy Tutorials (@enjoytutorials) on CodePen.

Leave a Reply