Definition and usage
The Text-decoration property specifies the adornment that is added to the text.
Note: The decorated color is set by the "Color" property.
Description
This property allows you to set some kind of effect on text, such as underlining. If the descendant elements do not have their own decorations, the decorations set on the ancestor elements "extend" to the descendant elements. User agents are not required to support blink.
Default value: |
None |
Inheritance: |
No |
Version: |
CSS1 |
JavaScript Syntax: |
object. style.textdecoration= "Overline" |
Possible values
value |
Description |
None |
Default. Defines the standard text. |
Underline |
Defines a line below the text. |
Overline |
Defines a line on the text. |
Line-through |
Defines a line that passes through the text. |
Blink |
Defines the blinking text. |
Inherit |
Specifies that the value of the Text-decoration property should be inherited from the parent element. |
Instance
Set text decorations for H1, H2, H3, H4 elements:
H1 {text-decoration:overline}h2 {text-decoration:line-through}h3 {text-decoration:underline}h4 {text-decoration: Blink
CSS Text-decoration Properties