overflow-wrap / word-break / hyphens

Mrs. Yanti’s narrow card on the notice board: set overflow-wrap, word-break, hyphens and lang, then every line the browser made is measured and each break is…

Why it matters

"Why does this URL stretch my card?" is an everyday layout bug. The three properties look alike but differ subtly: one cuts a word only when it must, one cuts anywhere, one adds hyphens when the language is known. Seeing the break points makes the choice obvious.

The key idea

Text only breaks at break points; break-word adds one only when cornered

Common mistakes

Try it in this playground