Hyphenation in a narrow column
Live demo
Justified narrow columns need hyphenation, otherwise the word spacing becomes uncomfortably irregular.
Caveat and fallback
CaveatIt does nothing without a lang attribute on the element or an ancestor. The browser needs to know which dictionary to hyphenate with, and silently declines rather than guessing.
FallbackNo dictionary for the language means no hyphens and ragged justification instead. Never rely on it to make a fixed-width layout fit.
Source code
<html lang="en"> /* without this, nothing */
.column {
hyphens: auto;
text-align: justify;
}
Published