Text Decoration

Category:CSS Properties

Text Decoration

The text-decoration property specifies the appearance of decorative lines on text. The most common text-decoration are:

  • text-decoration-line - Sets the kind of text decoration to use such as, underline, overline, line-through.
  • text-decoration-color - Sets the color of the text decoration.
  • text-decoration-style - Sets the style of the text decoration such as solid, wavy, dotted, dashed, or double.


Multiple Text Decorations

Setting different text decorations for a <h1> element.

h2 {
  text-decoration: underline overline wavy blue;

Overline text decoration

Setting an overline text decoration for a <h1> element.

h1 {
  text-decoration: overline;


text-decoration: value;


  • You may combine different kinds of text decorative in one statement.
  • The default value is no text decoration.

Additional Information

For more information, see http://www.w3schools.com/cssref/pr_text_text-decoration.asp

Found a bug in the documentation? Let us know at documentation@code.org