Skip to main content
CSS Tip

Better text wrapping using text-wrap

Enhance your text wrapping using text-wrap. No more lonely words at the end of paragraphs, and titles will look much better.

* {
text-wrap: pretty;
}
h1,h2,h3,h4,h5,h6 {
text-wrap: balance;
/* it works well with text-align: center */
}

Showing the effect of text-wrap


More CSS Tips