1. Computing

Discuss in my forum

text-decoration

By , About.com Guide

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:

©2013 About.com. All rights reserved.