The word-spacing property adjusts the gap between words — useful for readability tweaks, headings, and decorative typography.
01
Word gaps
Space between words.
02
Syntax
normal + lengths.
03
normal
Default value.
04
px & em
Fixed & relative.
05
Negative
Tighter text.
06
letter-spacing
Character partner.
Fundamentals
Introduction
The word-spacing property in CSS is used to specify the spacing between words in a text element. This property can be particularly useful for improving the readability of text, creating unique design effects, or adhering to specific design guidelines.
By adjusting the space between words, you can control the overall appearance and legibility of your text content.
Definition and Usage
Apply word-spacing on paragraphs, headings, labels, and buttons when you need finer control than line-height alone provides. Small adjustments can make uppercase headings feel more balanced; large adjustments are best reserved for short display text.
💡
Beginner Tip
word-spacing affects the space between words only. To change spacing inside words, use letter-spacing. For body paragraphs, subtle values like 0.05em or 2px are usually enough.
Foundation
📝 Syntax
The syntax for the word-spacing property is simple and allows you to specify the space between words in various units.
syntax.css
element{word-spacing:normal | <length>;}
The value can be the keyword normal or a length such as px, em, or rem. Negative lengths are allowed.
Basic Example
word-spacing.css
p{word-spacing:10px;}
Syntax Rules
normal resets to the browser default word spacing.
Length values add to (or subtract from with negatives) the normal spacing.
em and rem scale with font size for responsive typography.
Does not affect space inside words — only between word boundaries.
The default value of the word-spacing property is normal, which means the spacing between words is the default spacing used by the browser for the current font.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Default value
normal
Increase spacing
word-spacing: 10px; or 0.25em;
Tighten spacing
word-spacing: -2px;
vs letter-spacing
Words vs characters
Best for body text
Small subtle adjustments only
Inherited
Yes
Reference
💎 Property Values
The word-spacing property accepts the keyword normal or length values.
Value
Example
Description
normal
word-spacing: normal;
The default spacing between words.
<length>
word-spacing: 10px;
Adds the specified length to the normal inter-word space. Negative values reduce spacing.
em / rem
word-spacing: 0.25em;
Relative spacing that scales with font size.
inherit
word-spacing: inherit;
Inherits the word-spacing value from the parent element.
normal10px0.25em-2px
Context
When to Use word-spacing
word-spacing is helpful for fine typography tuning:
Display headings — Open up uppercase titles with extra word space.
Badges and labels — Improve legibility of short tracked-out text.
Justified text fixes — Subtle tweaks when justified lines look uneven (use carefully).
Brand typography — Match design specs for marketing hero sections.
Compact UI text — Slight negative spacing in tight toolbars (with caution).
Preview
👀 Live Preview
Same sentence with normal, 0.4em, and -1px word-spacing:
The quick brown fox jumps over the lazy dog.
normal
The quick brown fox jumps over the lazy dog.
word-spacing: 0.4em
The quick brown fox jumps over the lazy dog.
word-spacing: -1px
Hands-On
Examples Gallery
In this example, we’ll increase the word spacing of a paragraph to 10 pixels.
📜 Core Patterns
Adjust inter-word spacing with length values and compare the visual effect.
Example 1 — Increase word spacing to 10px
In this example, we’ll increase the word spacing of a paragraph to 10 pixels.
index.html
<style>p{word-spacing:10px;}</style><p>
This is an example of text with increased word spacing.
</p>
Text is split into words with default spacing from the font.
Layout
2
word-spacing adjusts the gap
The length value is added to each inter-word space.
Adjust
3
Line width recalculates
Wider spacing may cause earlier line wraps in fixed-width containers.
Reflow
=
✅
Custom word rhythm
Text reflects your chosen spacing style.
Compatibility
Browser Compatibility
The word-spacing property is well-supported in modern browsers, including the latest versions of Chrome, Firefox, Safari, Edge, and Opera. It is a reliable property for enhancing text layout and design across different web platforms.
✓ Modern browsers · Widely supported
Typography spacing
All major browsers support normal, length values, and negative word-spacing.
99%Browser support
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions
Full support
OperaAll versions
Full support
Testing tip
Compare word-spacing at different font sizes and on mobile to ensure headings and labels remain readable.
word-spacing property99% supported
Bottom line:word-spacing is safe to use for typography adjustments on the modern web.
Wrap Up
Conclusion
The word-spacing property is a versatile tool for web developers and designers looking to control the spacing between words in their text content.
Whether you’re aiming to improve readability, achieve a specific design effect, or adhere to particular design guidelines, adjusting the word spacing can help you achieve your goals. Experiment with different spacing values to see how they impact the look and feel of your text.