text-underline-offset
Widely availableSince 202097% of users
Allows you to precisely control the distance between an underline and the text baseline. Use it to keep underlines clear of letter tails or to place them exactly where you want.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since November 2020. Widely available since May 2023.
Newer parts of text-underline-offset
percentage valuesBaseline Dec 2024
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
auto- Inherited
- Yes
- Applies to
- all elements
- Animation type
- byComputedValueType
Quick example
a.fancy-link {
text-decoration: underline;
/* Pushes the underline 4px below the text baseline */
text-underline-offset: 4px;
}Values
autotext-underline-offset browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.Safe to use without fallbacks.
Usage97%of people can use this3% use a browser without it.
Browsers
87+
70+
12.1+
87+Mobile
87+Android
79+Android
12.2+iOS