Easy Tutorial
❮ Prop Iframe Height Prop Video Playbackrate ❯

textDecorationLine Property

Style Object

Example

Display a line at the top of the paragraph:


Definition and Usage

The textDecorationLine property sets or returns the types of lines to be used for text decoration.

Note: You can also use the textDecoration property to set textDecorationLine. The textDecoration property is a shorthand property for textDecorationLine, textDecorationStyle, and textDecorationColor.

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


Browser Support

Almost all major browsers do not support the textDecorationLine property.

Firefox supports an alternative property, MozTextDecorationLine.


Syntax

Return the textDecorationLine property:

Set the textDecorationLine property:

Property Values

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

Technical Details

Default value: none
Return value: String, representing the text-decoration-line property of the element.
--- ---
CSS version CSS3
--- ---

Related Articles

CSS Reference: text-decoration-line Property


Style Object

❮ Prop Iframe Height Prop Video Playbackrate ❯