Web design and digital-business ideas grounded in real tasks.

Balanced heading lines can adapt without a hard-coded break

A designer reviewing a simple web page on a laptop.
AI-generated photographic illustration; not documentary photography.

A heading fills one line almost completely, then leaves a single short word stranded below it. Adding a manual line break can improve that screenshot, but the same break may look awkward on a phone or after the heading is translated.

CSS text-wrap: balance asks the browser to distribute a short block’s lines more evenly. MDN’s text-wrap reference describes balance as particularly useful for short text such as headings and captions. It changes wrapping decisions rather than rewriting the words.

.article-title {
  max-inline-size: 28ch;
  text-wrap: balance;
}

This is a demonstration, not a universal measure for every font. The width still matters, and the property does not shrink the element’s box to the length of its longest resulting line. A background or border remains tied to the element’s layout dimensions.

Use actual titles in the comparison

Test a short title, a longer title and one containing a long word. Keep the same font and container while comparing ordinary wrapping with balanced wrapping. Then repeat with the intended webfont loaded and at a narrow viewport.

Chrome’s explanation of balanced text wrapping discusses the browser’s role and practical limitations. Implementations can limit the number of lines they balance, so it is not a substitute for designing readable long paragraphs.

If the result still looks poor, inspect the container width, font size and wording before adding more CSS. Balance cannot make a long unbreakable string fit every screen, and it does not replace an appropriate strategy for overflow or language-specific hyphenation.

Keep the fallback readable

Check the browsers used by your audience. Where the value is unsupported or not applied, normal wrapping should still leave a legible heading. Avoid making the design depend on one exact two-line arrangement.

Enlarge text and try relevant translations as part of review. Also remove old editorial line breaks that were inserted solely to force a desktop layout, unless they carry intentional meaning. Otherwise, those breaks can limit the improvement the browser is allowed to make.

The useful result is a heading that adapts gracefully while retaining its wording and hierarchy. Balanced lines can improve presentation, but the title still has to tell readers what the page offers.