The text-decoration
property designates the decoration added to text.
The text-decoration
property is also a shorthand property for text-decoration-line
(required), text-decoration-color
, text-decoration-style
, and text-decoration-thickness
.
h3 {
text-decoration: underline;
}
/* Shorthand version */
h3 {
text-decoration: underline solid green 3px;
}
text-decoration-line
Designates the kind of text decoration that will be displayed.
text-decoration-color
Designates the color of the text-decoration.
text-decoration-style
Designates the style of the text decoration.
text-decoration-thickness
Designates the thickness of the decoration line.
initial
Sets the property to its default value.
inherit
Inherits this property’s value from its parent item.
Have a code example of text-decoration
? Submit a codepen.io demo and we'll showcase it here ↴