Easy Tutorial
❮ Pr Dim Width Css Units ❯

CSS text-decoration-line Property

CSS Reference Manual

Example

Display a line at the top of the paragraph:


Browser Support

Almost all major browsers do not support the text-decoration-line property.

Firefox supports an alternative property, -moz-text-decoration-line.


Definition and Usage

The text-decoration-line property specifies the kind of line to be used for text decoration.

Note: You can also use the text-decoration property to set text-decoration-line. The text-decoration property is a shorthand for text-decoration-line, text-decoration-style, and text-decoration-color.

Note: You can use multiple values, such as underline and overline, to display lines above and below the text.

Default value: none
Inherited: no
--- ---
Animatable: no. See Animatable
--- ---
Version: CSS3
--- ---
JavaScript syntax: object.style.textDecorationLine="overline" Try it
--- ---

CSS Syntax

Property Values

Value Description Test
none Default value. Specifies no line for text decoration. Test »
underline Specifies a line below the text. Test »
overline Specifies a line above the text. Test »
line-through Specifies a line through the middle of the text. Test »
initial Sets this property to its default value. See initial Test »
inherit Inherits this property from its parent element. See inherit

CSS Reference Manual

❮ Pr Dim Width Css Units ❯