text-underline-position
Widely availableSince 202097% of users
Defines where an underline should be placed. While 'offset' moves it by a specific amount, 'position' lets you choose logical spots like 'under' the descenders (the tails of letters) or on the sides for vertical text.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since July 2020. Widely available since January 2023.
Newer parts of text-underline-position
leftBaseline Dec 2024rightBaseline Dec 2024from-fontBaseline Nov 2020, Widely May 2023
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
auto- Inherited
- Yes
- Applies to
- all elements
- Animation type
- discrete
Quick example
p {
text-decoration: underline;
/* Ensures the underline is placed below all character descenders for maximum clarity */
text-underline-position: under;
}Values
autofrom-fontunderleftrighttext-underline-position 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
33+
74+
12.1+
12+Mobile
33+Android
79+Android
12.2+iOS