text-wrap: pretty
Chrome 117, Safari 26.0 (improved algorithm); Firefox not yet (caniuse through 158).
Chrome 117
Edge 117
Safari 26
Firefox no
Better paragraph wrapping: avoids orphan words, improves hyphenation and evens out rag on the whole paragraph (Safari evaluates the whole paragraph; Chrome the last lines). Body-text counterpart to `balance`.
Pretty wrapping evaluates line breaks across the paragraph to avoid a single stranded word on the final line and to keep the right edge from looking ragged, which is what typographers do by hand.
CSS
.fx-041 {
text-wrap: pretty;
max-width: 42ch;
font-family: Georgia,serif;
line-height: 1.5;
hyphens: auto
}
HTML
<p class="fx-041">Pretty wrapping evaluates line breaks across the paragraph to avoid a single stranded word on the final line and to keep the right edge from looking ragged, which is what typographers do by hand.</p>Fallback: Firefox wraps normally; harmless.
Prompt
Set `text-wrap: pretty` on body copy, list items and descriptions (any multi-line prose), and `text-wrap: balance` on headings. It costs nothing where unsupported, so apply it globally to `p, li, dd, blockquote`.