HTML CSS examples for CSS Property:text-decoration-line
The text-decoration-line CSS property sets what kind of line decorations are added to the element.
The following table summarizes the text-decoration-line Property.
Item | Value |
---|---|
Default value: | none |
Applies to: | All elements. It also applies to ::first-letter and ::first-line. |
Inherited: | No |
Animatable: | No. |
The syntax of the property is as follows:
text-decoration-line: none | [ underline | overline | line-through | blink ] one or more values | initial | inherit
The following table describes the values of this property.
Value | Description |
---|---|
none | no decoration. This is default value. |
underline | underlined. |
overline | text has a line above it. |
line-through | text has a line through the middle. |
blink | Makes the text blink. |
initial | Sets this property to its default value. |
inherit | take the value of its parent element text-decoration-line property. |
The example below shows the text-decoration-line property.
<!DOCTYPE html> <html lang="en"> <head> <title>Example of CSS3 text-decoration-line Property</title> <style type="text/css"> p {<!-- ww w. ja va 2s . co m--> -moz-text-decoration-line: underline; /* Firefox */ text-decoration-line: underline; /* Standard syntax */ } p.multiple { -moz-text-decoration-line: underline overline; /* Firefox */ text-decoration-line: underline overline; /* Standard syntax */ } </style> </head> <body> <p>This is some decoration text.</p> <p class="multiple">This text has multiple decorations.</p> </body> </html>