text-wrap-style
Newly availableSince 202491% of users
Controls the algorithm used to wrap text. 'balance' suits short headlines, keeping lines roughly equal in length, while 'pretty' avoids 'orphans' (single words on a new line) in paragraphs.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since October 2024. Widely available around April 2027.
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
auto- Inherited
- Yes
- Applies to
- text and block containers
- Animation type
- discrete
Quick example
h2 {
/* Automatically adjusts line breaks to make the lines look evenly balanced */
text-wrap-style: balance;
}Values
autobalancestableprettytext-wrap-style browser support
BaselineNewly availableSince 2024 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.Works in all modern browsers. May need a fallback for older browsers.
Usage91%of people can use this9% use a browser without it.
Browsers
130+
124+
17.5+
130+Mobile
130+Android
124+Android
17.5+iOS