Javatpoint Logo
Javatpoint Logo

CSS text-decoration

It is a CSS property that decorates the content of the text. It adds lines under, above, and through the text. It sets the appearance of decorative lines on text. This CSS property decorates the text with several kinds of lines. This is shorthand for text-decoration-line, text-decoration-color, and text-decoration-style.

The syntax of this CSS property is given as follows-


Let's discuss its property values along with an example.


It sets the kind of text-decoration like overline, underline, or line-through. It can be used to add a combination of lines to the selected text.


In this example, we are going to use the values underline, overline, and line-through. We will also see how to use these values simultaneously.

Test it Now


This property is used to set the style of the line. Its values are solid, dotted, wavy, double, and dashed.

The following example explains this property more clearly.


Test it Now


This property is used to provide color to the decoration. Its value is any color in a valid format.


Test it Now

Next TopicCSS Lists

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA