Table of contents
- 1. Summary
- 2. Syntax
- 3. Examples
- 4. Specifications
- 5. Browser compatibility
- 6. See also
Summary
The text-decoration-style CSS property defines the style of the lines specified by text-decoration-line
. The style applies to all lines, there is no way to define different style for each of the line defined by text-decoration-line.
If the specified decoration has a specific semantic meaning, like a line-through line meaning that some text has been deleted, authors are encouraged to denote this meaning using an HTML tag, like <del>
or <s>
. As browsers can disabled styling in some cases, the semantic meaning won't disappear in such a situation.
- Initial value
:
solid - Applies to: all elements
- Inherited : no
- Percentages: n/a
- Media:
visual - Computed value : the value as specified via the syntax
Syntax
text-decoration-style: inherit or text-decoration-style: style
where :
- inherit
- Is a keyword indicating to reuse the value calculated on the parent element.
- style
- Is one of the following keywords :
Keyword Description Live example Comment solidDraws a single line Lorem ipsum doubleDraws a double line Lorem ipsum dottedDraws a dotted line Lorem ipsum dashedDraws a dashed line Lorem ipsum wavyDraws a wavy line Lorem ipsum -moz-noneNon-standardDo not draw a line Lorem ipsum Do not use : use text-decoration-line: noneinstead
Examples
.example {
text-decoration-line: underline;
text-decoration-style: wavy;
text-decoration-color: red;
}
This is how it looks.
Specifications
| Specification | Status | Comment |
|---|---|---|
| CSS Text Level 3 | Working Draft |
Browser compatibility
| Feature | Firefox (Gecko) | Chrome | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | 6.0 (6.0)
-moz | -- | -- | -- | -- |
| Feature | Firefox Mobile (Gecko) | Android | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | 6.0 (6.0)
| -- | -- | -- | -- |


Mozilla Developer Network