HomeToolsText Decoration

CSS WORKSPACE

Text Decoration

Make a change, inspect the result, and take the output into your project.

How to use this tool ↓

Configuration

Presets
Decoration Style
Dimensions
2px
4px
Preview Typography
32px
Live Preview
The quick brown fox jumps over the lazy dog.
Generated CSS
css
text-decoration-line: underline;
text-decoration-style: solid;
text-decoration-color: #3b82f6;
text-decoration-thickness: 2px;
text-underline-offset: 4px;
text-decoration-skip-ink: auto;
/* Shorthand (Basic Support) */
text-decoration: underline solid #3b82f6 2px;
A PRACTICAL GUIDE

Make links recognizable at a glance

Text decoration can underline a link, strike through an old price, or mark an edited phrase. For normal links in a paragraph, an underline gives a useful cue beyond color. Adjust its thickness and position to improve readability without making the link feel like a separate component.

How to use this tool

  1. Choose a decoration line and style. Start with a solid underline for a conventional text link.
  2. Adjust thickness and color, then check lowercase letters with descenders. Underline offset can create space below the text.
  3. Copy the decoration rules onto the link selector. Keep a visible keyboard focus style and check the visited-link appearance.

Relative em units let the line thickness and offset scale with the text size. These rules style the underline without changing the link destination or behavior. The underlying element should still be an anchor with a meaningful href.

Read the reference documentation ↗
Example to try in your project
.article a {
  text-decoration-line: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

Before you ship

Do not underline non-interactive text in a way that makes it look clickable. Removing underlines from paragraph links leaves color as the only cue and can make them difficult to identify.

Explore a related tool