Justification Algorithms
Algorithms for beautiful blocks.
The Greedy Browser
Browsers use a greedy algorithm, justifying one line at a time. TeX uses a paragraph-level algorithm to balance spacing globally.
Full justification without proper hyphenation support reduces reading speed by 9% due to uneven word spacing.
Common Justification Mistakes
| Mistake | Impact | Solution |
|---|---|---|
| text-align: justify on mobile | Massive white rivers between words. | Only justify on desktop, or don't use it at all on the web. |
Word Spacing Variance Tool
FAQ
Why do physical books use justification?
They are typeset manually or with advanced paragraph-level algorithms like Knuth-Plass.
Explore the Architecture
Connect this concept to the broader system: