You are here: Reference > CSS > properties > text-decoration

text-decoration property

Browser support:
Specifies the appearance characteristics of text, whether it is underlined, overlined, lined-through or blinking text.
You can specify a space separated list of decoration types, if you want to use more than one for an element.
JavaScript page for this property: textDecoration. You can find other example(s) there.

Possible values:

 One of the following values: 
 Any of the following values (use the space character to separate them, each value can be used only once): 
underline
overline
line-through
blink
none
-moz-anchor-decoration
inherit

Description of values:

-moz-anchor-decoration
Use default anchor decoration.
blink
The text content of the element blinks.
inherit
Takes the value of this property from the computed style of the parent element.
line-through
The text content of the element is displayed with a line through the middle.
none
No text decoration is used.
overline
The text content of the element is displayed with a line at the top.
underline
The text content of the element is underlined.
Default: none.

Example HTML code 1:

This example illustrates the use of the text-decoration property:
<head>
    <style>
        .example {
            text-decoration: overline line-through;
        }
    </style>
</head>
<body>
    <a class="example">Text decoration: overline line-through</p>
</body>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content