text-wrap: balance

텍스트 밸런스

A CSS property that recomputes a multi-line headline's break points so each line ends up roughly the same length.

Also known as: 제목 줄바꿈 균형
···
html
<div class="stage">
  <div class="col">
    <div class="tag">text-wrap: normal</div>
    <h3 class="normalwrap">디자인은 결국 커뮤니케이션 문제를 푸는 일이다</h3>
  </div>
  <div class="col">
    <div class="tag good">text-wrap: balance</div>
    <h3 class="balancewrap">디자인은 결국 커뮤니케이션 문제를 푸는 일이다</h3>
  </div>
</div>
css
.stage{display:flex;gap:22px;justify-content:center;flex-wrap:wrap;padding:0 8px}
.col{display:grid;max-width:180px}
h3{font:800 17px/1.4 system-ui,-apple-system,"Apple SD Gothic Neo",sans-serif;color:var(--fg);margin:0;animation:resize 5s ease-in-out infinite}
.normalwrap{text-wrap:normal}
.balancewrap{text-wrap:balance}
@keyframes resize{0%,100%{width:150px}50%{width:190px}}
.tag{font:10px ui-monospace,Menlo,monospace;color:var(--muted);margin-bottom:6px}
.tag.good{color:var(--accent-3)}

Default wrapping (`normal`) fills lines greedily, so headlines often end awkwardly — a long line followed by a short one, or a single stray word on the last line. Designers have long hand-placed `<br>` tags to fix this.

`text-wrap: balance` has the browser look at the whole block ahead of time and find break points that keep the same number of lines while making their widths more even. It recalculates on viewport changes, removing the need for manual `<br>`s in responsive layouts.

Because the calculation is costly, Chromium caps it to roughly six lines or fewer — for longer body paragraphs, use `text-wrap: pretty` instead (see "Widows and orphans").

When to use

Hero headlines, card titles, modal titles — short text that wraps to a few lines. Won't apply to long body paragraphs.