CSS PROPERTIES
Expand All|Collapse All
CSS AT-RULES
SPONSORED LINKS

CSS3 text-decoration-line Property

Topic: CSS3 Properties Reference« Prev|Next »

Description

The text-decoration-line CSS property specifies what kind of line decorations are added to the element. This property can accepts one or more space separated values.

The following table summarizes the usages context and the version history of this property.

Default value: none
Applies to:
All elements. It also applies to ::first-letter and ::first-line.
Inherited: No
Animatable: No. See animatable properties.
Version: New in CSS3

Syntax

The syntax of the property is given with:

text-decoration-line: 
none | [ underline | overline | line-through | blink ] one or more values | initial | inherit

The example below shows the text-decoration-line property in action.

  • p {
  •     -moz-text-decoration-line: underline; /* Firefox */
  •     text-decoration-line: underline; /* Standard syntax */
  • }
  • p.multiple {
  •     -moz-text-decoration-line: underline overline; /* Firefox */
  •     text-decoration-line: underline overline; /* Standard syntax */
  • }

Property Values

The following table describes the values of this property.

Value Description
none Text has no decoration. This is default value.
underline Each line of text is underlined.
overline Each line of text has a line above it.
line-through Each line of text has a line through the middle.
blink Makes the text blink (alternates between visible and invisible). This value is deprecated in favor of Animations.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element text-decoration-line property.

Browser Compatibility

The text-decoration-line property is not supported in most of the browsers.

Browsers Icon

Basic Support—

  • Firefox 6+ -moz-, 36+
  • Google Chrome ×
  • Internet Explorer ×
  • Apple Safari ×
  • Opera ×
 

Warning:The text-decoration-line property is currently not supported by the most of the browsers. You should better avoid using this property.


Further Reading

See tutorial on: CSS Text, CSS Border.

Related properties: text-decoration, text-decoration-color, text-decoration-style.

 
Close

Your Feedback:

 

We would love to hear from you! Please say something.