CSS text-decoration property

CSS text-decoration

CSS text-decoration is a short hand property used to add decorative lines to a text.

It consists of following shorthand properties

  • text-decoration-line : It is used to specify the type of decoration lines used in the text.
  • text-decoration-color : It is used to specify the color for the decorations.
  • text-decoration-style : It is used to specify the style of the line used.


Try Yourself

In the above example values used in border-top property are,

overline, line-through, underline - text-decoration-line

orange, white, green - text-decoration-color

wavy, double - text-decoration-style