CSS Property - Text Decoration

Value: none | [ underline || overline || line-through || blink ]
Initial: none
Applies to: all elements
Inherited: no, but see clarification below
Percentage values: N/A

The CSS property "text-decoration" describes decorations that are added to the text of an element. If the element has no text (e.g. the "IMG" element in HTML) or is an empty element (e.g. "<EM></EM>"), this property has no effect. A value of "blink" causes the text to blink.


p{text-decoration: underline;}


p{text-decoration: line-through;}

Line Through

p{text-decoration: overline;}


p{text-decoration: blink;}

This text Should Blink (not in IE)

The color(s) required for the text decoration should be derived from the "color" property value.

This property is not inherited, but elements should match their parent. E.g., if an element is underlined, the line should span the child elements. The color of the underlining will remain the same even if descendant elements have different "color" values.


a:link, a:visited, a:hover{
text-decoration: underline;

The example above would underline the text of all links (i.e., all "a" elements with a "href" attribute).

UAs must recognize the keyword "blink", but are not required to support the blink effect.