CSS text-decoration-style Property
Description
The text-decoration-style property controls the visual pattern used to draw decoration lines applied to text—such as underlines, overlines, or line-through marks—by defining the line’s appearance (its overall texture and how it is painted). It does not decide whether a decoration exists; that is determined by text-decoration-line. Instead, this property only affects how any existing decoration is rendered, so changing it can make the same underline look bold, subtle, broken, or ornamental without altering layout or semantics.
Because text decoration is typically composed of several cooperating properties, text-decoration-style is used together with the shorthand text-decoration and with other decoration-related properties such as text-decoration-color to produce the final visual result. In practice you set the style when you want text decorations to match a design language (for example, to appear delicate or prominent) while using color and thickness controls to tune contrast and legibility. The shorthand can set multiple decoration aspects at once, but adjusting text-decoration-style independently gives more granular control.
Rendering considerations are important: the chosen style interacts with line fragmentation, wrapping, and how decorations are painted across inline boxes. The exact visual outcome can vary depending on font metrics, rendering engine decisions about placement and clipping, and whether decorations are applied to parent elements or directly to the inline element. For accessibility and readability, prefer styles that maintain sufficient contrast and clear separation from glyph shapes; when fine control is needed over position and weight of the decoration, combine the style choice with complementary properties (such as thickness or offset controls) to achieve a stable, legible result.
Definition
- Initial value
- solid
- Applies to
- All elements
- Inherited
- No
- Computed value
- As specified
- Animatable
- No
- JavaScript syntax
- object.style.textDecorationStyle
Interactive Demo
Syntax
text-decoration-style: solid | double | dotted | dashed | wavy
Values
- solidA single line segment.
- doubleTwo solid lines that are parallel with some space between them.
- dottedA series of round dots.
- dashedA series of square-ended dashes.
- wavyIndicates a wavy line.
Example
Browser Support
The following information will show you the current browser support for the CSS text-decoration-style property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
