text-decoration

A shorthand property that sets the appearance of decorative lines on text, such as underlines, overlines, and strike-throughs.

Quick example

a.modern-link {
  text-decoration: underline var(--accent) 2px;
  text-underline-offset: 4px;
  /* creates a custom colored underline with custom thickness and offset */
}

Quick facts

Initial value
See individual properties
Inherited
No
Applies to
all elements

Values

text-decoration-linetext-decoration-styletext-decoration-colortext-decoration-thickness

text-decoration Browser Support

Widely available Since 2015 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.

Safe to use without fallbacks.

1+
1+
1+
12+
ESC