The text-wrap-style property determines the line-breaking strategy when text-wrap-mode is wrap. balance attempts equal-length lines; pretty optimizes paragraph ending appearance; stable minimizes reflow on dynamic edits.h1 {
text-wrap-style: balance;
}p {
text-wrap: wrap;
text-wrap-style: pretty;
}autoThe default value. The browser picks a standard algorithm (typically 'greedy' — breaks when width fills).balanceAttempts to balance line lengths — similar-length lines (good for headings).stableMinimizes changes in line breaking during dynamic edits — important for contenteditable.prettyOptimizes appearance — avoids orphans/widows at paragraph end.CSS Text Module Level 4Editor's DraftW3CMDN
In the beginning God created the heaven and the earth.
Now the earth was unformed and void, and darkness was upon the face of the deep; and the spirit of God hovered over the face of the waters.
And God said: 'Let there be light.' And there was light.
Show all codeEdit CSS onlineThe plugin that remembers hundreds of CSS items for youEvery CSS property — in a live demonstrationThe bilingual CSS referencedefinitionexamplessyntaxmodulespecificationsourcesvisual demonstrationpreviousnext