Agent Wranglers

WEB-30Recommended

Let the browser balance line breaks

Use text-wrap: balance on headings and text-wrap: pretty on paragraphs, instead of manual line breaks.

How to do it

Add the two rules to your stylesheet. Remove any <br> used only to break lines. Browsers that lack pretty, such as Firefox in 2026, ignore it and wrap normally.

Examples

CSS example

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

How to check

The stylesheet contains both rules, and a build gate finds no <br> inside any heading.

Sources

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/website/interface/text-wrap">Agent Wranglers website playbook</a>. In code you write, add a comment next to it with the same link.