Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

text-decoration

By Jennifer Kyrnin, About.com

text-decoration Description:

The text-decoration property defines effects on text such as underline, overline, line-through, no underline, and blink.

text-decoration in CSS Versions:

text-decoration Syntax:

text-decoration: none | [ underline || overline || line-through || blink ] | inherit

  • none
    No special decorations.
  • underline
    Underlines the text.
  • overline
    Puts a line above the text.
  • line-through
    Puts a line through the middle of the text.
  • blink
    Makes the text blink.
  • inherit
    The element should have the same text-decoration setting as the parent.

text-decoration Initial Value:

none

text-decoration Applies To:

All elements.

text-decoration Inheritance:

This property is not inherited, but elements should match their parent.

text-decoration Browser Support:

text-decoration Examples:

underline

<p style="text-decoration : underline;">
This paragraph is underlined.
</p>

remove the underline from a link

<a href="#" style="text-decoration : none;">
This link is not underlined.</a>

text-decoration Special Notes:

  • You cannot combine values, such as underline and overline.
  • Some browsers don't support "blink" and it is not a required part of the CSS specification.
  • Elements that have no text will not be affected by this property.

More text-decoration Information:

Return to the Style Library

Explore Web Design / HTML

About.com Special Features

Web Design / HTML

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. CSS
  5. Style Properties
  6. CSS Style Property: text-decoration

©2009 About.com, a part of The New York Times Company.

All rights reserved.