word-spacing adds extra space, or with a negative value, removes space, specifically at the space characters between words, leaving the letter-spacing within each individual word completely unaffected — this makes it distinct from, and usable together with, letter-spacing, which instead affects the spacing between every pair of characters, including those within a single word. Word-spacing is used considerably less often than letter-spacing in practice, since large adjustments to inter-word spacing can quickly start to look unnatural or hurt readability, especially in justified text where word spacing is already being dynamically adjusted by the browser to fill each line evenly.
1Understanding Word-spacing
word-spacing adds extra space, or with a negative value, removes space, specifically at the space characters between words, leaving the letter-spacing within each individual word completely unaffected — this makes it distinct from, and usable together with, letter-spacing, which instead affects the spacing between every pair of characters, including those within a single word. Word-spacing is used considerably less often than letter-spacing in practice, since large adjustments to inter-word spacing can quickly start to look unnatural or hurt readability, especially in justified text where word spacing is already being dynamically adjusted by the browser to fill each line evenly.
Use word-spacing sparingly and with small values — since it directly affects the readability-critical spacing between words, larger adjustments tend to look unnatural much more quickly than an equivalent adjustment to letter-spacing does.
.spaced-out {
word-spacing: 8px;
}2Practical Example
Here is a real-world application of Word-spacing showing how it is used in production CSS code.
.tight-text {
word-spacing: -2px;
}3Best Practices
Follow these guidelines when working with Word-spacing:
1. Reach for word-spacing only for subtle adjustments to a design's visual rhythm, since large changes to inter-word spacing quickly look unnatural
2. Combine word-spacing and letter-spacing together deliberately when a design genuinely calls for both, since they affect entirely separate, independent aspects of text spacing
3. Be cautious combining word-spacing with justify-aligned text, since the browser is already dynamically adjusting word spacing there to achieve even line edges
Tip: Use word-spacing sparingly and with small values — since it directly affects the readability-critical spacing between words, larger adjustments tend to look unnatural much more quickly than an equivalent adjustment to letter-spacing does.
.spaced-out {
word-spacing: 8px;
}