The default line-breaker fills each line greedily, so a headline near its
container edge strands its last word alone. text-wrap: balance evens
the lines out instead. Edit the text, drag the width, and watch both boxes
re-break — the metrics are measured from the real rendered lines.
text-wrap: pretty is for
balance would reshape every line of a long paragraph. pretty only
touches the last few lines, pulling a stranded final word back up. Toggle it:
Long-form paragraphs have their own orphan problem: a single word stranded on the last line looks unfinished. Turning on pretty asks the browser to look ahead and avoid it, without disturbing the rhythm of the lines above.
Baseline 2024 — no JavaScript, no <br>, no ResizeObserver. Unsupported browsers just fall back to the default wrap.