The text-decoration-style property sets the look of decoration lines created by text-decoration-line—solid, double, dotted, dashed, or wavy.
It is not inherited. The initial value is solid. Style alone is invisible until a line exists. For several decoration settings at once, prefer the text-decoration shorthand.
Non-standard Avoid -moz-none
Firefox once offered -moz-none. Do not use it. Turn decorations off with text-decoration-line: none instead.
Same API for dotted. Swap the keyword to dotted for dots.
Still one style. If you also set overline, both lines share this style.
Edge Cases & Pitfalls
If nothing changes on screen, one of these is usually why.
line
Style needs a decoration line
Without underline, overline, or line-through, changing style has no visible effect.
shared
One style for every line
You cannot give underline and overline different styles on the same element. Both use the same keyword.
semantics
Meaning beats paint alone
For deleted text, use <del> or <s>. Browsers may disable styling; semantic HTML keeps the meaning.
shorthand
Shorthand can reset longhands
Setting text-decoration later can override a previous text-decoration-style. Order your rules carefully.
legacy
Skip -moz-none
That value is non-standard. Hide decorations with text-decoration-line: none.
Compatibility
Browser Support
text-decoration-style is a browser text-decoration property. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
text-decoration-style
Supported in modern browsers since around January 2020 interoperability. Internet Explorer does not support this property.
96%Modern browsers
Google Chrome57+
Full
Mozilla Firefox36+
Full
Apple Safari12.1+
Full
Microsoft Edge79+
Full
Opera44+
Full
Samsung Internet7+
Full
Internet ExplorerNo
None
text-decoration-styleWidely supported
Bottom line: Safe for modern sites. Older Safari needed a -webkit- prefix; IE has no support.
Remember
Key Takeaways
Role: choose how decoration lines look (not whether they exist).
Values:solid, double, dotted, dashed, wavy.
Initial value:solid. Not inherited. Needs a decoration line first.
Shorthand:text-decoration can set style with line, color, and thickness together.
One line:text-decoration-style picks the pattern of an underline, overline, or line-through.
Frequently Asked Questions
It sets how decoration lines look: solid, double, dotted, dashed, or wavy. The line itself comes from text-decoration-line or the text-decoration shorthand.
The initial value is solid, which draws a single continuous decoration line.
Yes. Style alone does nothing visible until a decoration line exists, such as underline, overline, or line-through.
text-decoration is shorthand for line, style, color, and thickness. text-decoration-style controls only the line pattern.
Wavy lines work well for spell-check style hints or light decorative emphasis. Prefer solid for most links and body text.
It is Baseline Widely available in modern browsers (Chrome 57+, Firefox 36+, Safari 12.1+, Edge 79+). Internet Explorer does not support it. It is a browser rendering property, not a Node.js feature.