CSS text-wrap-style: pretty for Long-Form Paragraphs
Pretty paragraph wrapping without orphan words
Long paragraphs often end with one short word on the last line. The old fix was a non-breaking space hand-placed in the copy. text-wrap-style: pretty tells the browser to avoid orphans across the whole paragraph.
article p { text-wrap: wrap;}/* default browser line-breaking, single-word last lines stay article p { text-wrap: pretty;}/* no orphan words on the last line text wrap pretty Browser Support
Since 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.
The text-wrap-style property is Baseline Newly Available since 2024, but the pretty value specifically has not shipped in Firefox yet. Chrome and Edge support it from version 130, Safari from 17.5 (with a refined algorithm in 26). Firefox falls back to default wrapping with no layout breakage, so treat pretty as progressive enhancement.
No copy edits
No more hunting for last-line orphans and patching with . The browser rebalances the whole paragraph.
Different from balance
balance is for short blocks like headlines. pretty is for long-form body text where only the tail needs help.
Graceful fallback
Browsers without the pretty value fall back to default wrapping. No layout breakage, just no enhancement.
How it works
Long paragraphs often look fine until the last line, which ends with a single short word (a runt). The traditional fix was to find each one and insert a non-breaking space between the last two words in the source copy. That works once, but breaks the moment the container resizes or the copy changes.
text-wrap-style: pretty (or the shorthand text-wrap: pretty) tells the browser to consider the whole paragraph when breaking lines. It will pull a word back from earlier lines if doing so removes a single-word last line. Use it on body copy: article p, .prose p, blog post content. Avoid it on huge paragraphs in performance-critical paths because the algorithm is slower than default wrapping.
pretty and balance solve different problems. Use balance on headlines and short blocks (a few lines), where you want even line lengths. Use pretty on long-form text, where you only want to clean up the last line. Don't use both on the same element.