Home | Computer Science

<
CSS Text Decoration Color

Defination

The text-decoration-color property specifies the color of the text-decoration (underlines, overlines, linethroughs).


CSS Text Decoration color
Syntax of Text decoration color is
p {
Text-decoration-color: ;
}
Note
Its value can be given by RGB HEX or Simple Value etc...
Program
INPUT

<!DOCTYPE html> <html> <head> <style> h1 { text-decoration-line: overline; text-decoration-color: red; } h2 { text-decoration-line: line-through; text-decoration-color: blue; } h3 { text-decoration-line: underline; text-decoration-color: green; } p { text-decoration-line: overline underline; text-decoration-color: purple; } </style> </head> <body> <h1>Overline text decoration</h1> <h2>Line-through text decoration</h2> <h3>Underline text decoration</h3> <p class="ex">Overline and underline text decoration.

<p><strong>Note:</strong> It is not recommended to underline text that is not a link, as this often confuses the reader.</p> </body> </html>

OUTPUT