Search within TutorialsPark

CSS text-decoration Property


To specify a drop shadow for a block of text


Definition and Notes.

1. The CSS text-decoration property is used to add lines above, under, and /or through the text.

2. As a good development practice, do not use underline for anything other than links. The color of text-decoration is by default same as the color of the text.Unless specified otherwise.

Syntax:

CSS text-decoration property. internetexplorer safari firefox opera chrome

View in Splitscreen»

Code-Editor:

Note- The property also supports a blink value, that makes the element blink, but not supported by any major browser

Property Values

Value Description
none No decoration is performed on the text. Its the default value.
overline To draw a line above the text
underline To draw a line under the text
line-through To draw a line through the middle of the text.
inherit The value is inherited from the parent element.

Specifications

Specs Value
Name text-decoration
Value none | [underline || overline || line-through || blink]
Initial Value None
Applies to All Elements
Javascript syntax object.style.textDecoration="underline"
Inherited No
Computed Value Same as declared Value.
Browser Support internetexplorer safari firefox opera chrome


Related Examples.