W3docs

CSS text-decoration-skip Property

The text-decoration-skip CSS property specifies the parts of the content to be skipped. See property values and try examples.

The text-decoration-skip property specifies the parts of an element’s content the text decoration should skip over.

It controls all text decoration lines drawn by the element and by its ancestors. Unlike text-decoration-skip-ink, which only targets ink overlapping text, this property attempted to skip decorations over whitespace and replaced elements, but was ultimately removed from the specification.

Danger

The "ink" value was moved to the text-decoration-skip-ink property.

Note

This property is obsolete and has very limited browser support. Consider using text-decoration-skip-ink instead.

Initial Valuenone
Applies toAll elements.
InheritedYes.
AnimatableNo.
VersionDraft (Obsolete)
DOM Syntaxobject.style.textDecorationSkip = "spaces";

Syntax

CSS text-decoration-skip values

text-decoration-skip: none | objects | spaces | leading spaces | trailing spaces | edges | box-decoration;

Example of the text-decoration-skip property:

CSS text-decoration-skip code example

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
    <style>
      p {
        margin: 1em;
        color: #ccc;
        font-size: 2em;
        text-decoration: underline;
        text-decoration-skip: edges;
      }
    </style>
  </head>
  <body>
    <h2>Text-decoration-skip property example</h2>
    <p>
      <em>Lorem,</em>
      <em>ipsum is simply dummy text</em>
    </p>
  </body>
</html>

Result

CSS text-decoration-skip values list

Note

This property is obsolete and not supported in modern browsers. The example will not render any visual changes.

Values

ValueDescription
noneNo skip will appear. Thus, text decoration is drawn for all text content.
objectsSkips decorations over replaced elements (like images) or inline-block boxes.
spacesAll spacing is skipped.
leading spacesLeading spaces are skipped (typographic character units, word separators, letter-spacing or word-spacing).
trailing spacesTrailing spaces are skipped (typographic character units, word separators, letter-spacing or word-spacing).
edgesThe start and end of the text decoration is inset slightly from the content edge of the decorating box.
box-decorationThe box’s margin, border, and padding areas are skipped.

Browser Compatibility

BrowserSupport
ChromeNever implemented
FirefoxNever implemented
SafariNever implemented
EdgeNever implemented
OperaNever implemented

Practice

Practice

What does the 'text-decoration-skip' property in CSS do?