Skip to content
Tutorials Center
My learning

Topics

CSS Reference ยท Typography

The text-decoration-style property

Reference for the CSS text-decoration-style property: solid, double, dotted, dashed and wavy lines for underlines and strike-throughs, with live examples.

The text-decoration-style property chooses how the decoration line is drawn: a plain solid line, a double line, dotted, dashed or wavy. The wavy style is familiar from spell checkers, so use it carefully, because readers may take it as an error mark.

CSS
.hint {
  text-decoration-line: underline;
  text-decoration-style: dotted;
}

Try it

All five styles
Abbreviation hint

Syntax

CSS
text-decoration-style: solid | double | dotted | dashed | wavy;
  • Initial value: solid
  • Applies to: all elements; also ::first-letter and ::first-line
  • Inherited: no
  • Animatable: no
  • Computed value: as specified

Values

Value Description
solid A single continuous line.
double Two parallel lines.
dotted A line of dots.
dashed A line of dashes.
wavy A wavy (squiggly) line.

Usage notes

  • It needs a line. The style is visible only when text-decoration-line is not none.
  • Thickness matters. double needs enough thickness to separate its two lines; with very thin lines it can look like a single line. Increase text-decoration-thickness if needed.
  • Wavy means error to many people. Reserve it for validation hints or playful headings.
  • Shorthand resets. Using the text-decoration shorthand later in the cascade resets the style to solid unless you include it.
  • Line-through and overline use the same styles.
  • Skipping ink. Browsers may interrupt the line around descenders; this is controlled by text-decoration-skip-ink, and it happens for underlines and overlines.

Browser support

Supported in current versions of all major browsers.