HTML CSS examples for CSS Property:text-decoration-style
The text-decoration-style CSS property sets the style of the lines for the text-decoration-line property.
The following table summarizes the text-decoration-style Property.
Item | Value |
---|---|
Default value: | solid |
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-style: [ solid | double | dotted | dashed | wavy ] one or more values | initial | inherit
The following table describes the values of this property.
Value | Description |
---|---|
solid | displayed as a single line. This is default value. |
double | displayed as a double line. |
dotted | displayed as a dotted line. |
dashed | displayed as a dashed line. |
wavy | displayed as a wavy line. |
initial | Sets this property to its default value. |
inherit | take the value of its parent element text-decoration-style property. |
The example below shows the text-decoration-style property.
<!DOCTYPE html> <html lang="en"> <head> <title>Example of CSS3 text-decoration-style Property</title> <style type="text/css"> p {<!--from ww w . j a v a2 s .c o m--> text-decoration: underline; -moz-text-decoration-style: dotted; /* Firefox */ text-decoration-style: dotted; /* Standard syntax */ } </style> </head> <body> <p>This is some decoration text.</p> </body> </html>