Categories
Web development

CSS text-decoration-color Property



CSS text-decoration-color Property

The CSS text-decoration-color property defines the colour of the text-decoration (underlines, linethroughs, overlines).

Demo:

Click the “Try it” button to change the colour of the underline:

Hello world!


Syntax:

text-decoration-color: color;

color – defines the colour of the text-decoration.

Example:

<!DOCTYPE html>
<html>
<head>
<style>
p {
  text-decoration: underline;
  text-decoration-color: lightblue;
}
</style>
</head>
<body>

<p>This is a paragraph.</p>

</body>
</html>

Output:

This is a paragraph.

Read also:

CSS font-style Property

CSS border-left-style

HTML Quotations