CSS word-spacing Property

Beginner
5 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The word-spacing property sets the spacing between words. A length or percentage value is extra space added to the font’s normal inter-word gap — not a replacement for it.

The property is inherited. The initial value is normal. Use it for light typography tuning; pair with letter-spacing when you also adjust space inside words.

Baseline widely available.

Supported across modern browsers since mid‑2015. No deprecated or experimental keywords for the core values.

CSS Syntax

syntax.css
word-spacing: normal | <length-percentage> | initial | inherit;

Example: word-spacing: 0.25em;. Percentages resolve against the text’s font-size.

Property Values

ValueDescriptionTry it
normalDefault spacing from the font and browserTry it
<length>Extra space (e.g. 4px, 0.3em). May be negativeTry it
<percentage>Extra space relative to the text’s font-sizeTry it
Negative lengthPulls words closer (keep modest for readability)Try it
initialResets to the default value, normalTry it
inheritInherits this property from the parent elementTry it

How to Use word-spacing

Start from normal, then add a small length or percentage until the line feels right.

  1. Apply word-spacing on the text element (or a parent — it is inherited).
  2. Prefer relative units (em, %) when font size may change.
  3. Keep values modest. Large gaps or heavy negatives hurt readability (WCAG 1.4.8).
  4. Use letter-spacing for character gaps; use this property for word gaps.
PieceRequired?Role
Text with spaces between wordsYesNo word gaps means nothing visible changes
normal or length/percentageYesChooses default vs extra spacing
letter-spacingOptionalCompanion control inside words
white-spaceOptionalAffects how spaces and wrapping behave

Live Preview

Change word-spacing and watch the gaps between words open or tighten.

Length and percentage values add extra space on top of the font’s normal word gap.

Sample sentence

The quick brown fox jumps over the lazy dog.

word-spacing: normal

CSS Examples

Each snippet focuses on word-spacing with a short sentence so the effect is easy to see. Use Try It Yourself for a live editor.

Example 1 — Length Value

Add a fixed amount of extra space between words.

CSS
<style>
  p {
    word-spacing: 0.4em;
  }
</style>

<p>The quick brown fox jumps over the lazy dog.</p>
Try It Yourself

How It Works

  1. Target the paragraph. The rule applies to the text element (or inherits from a parent).
  2. Set a length. 0.4em adds extra space relative to the current font size.
  3. Extra, not total. The browser still uses the font’s normal word gap, then adds your value.
  4. Units matter. em scales with font size; px stays fixed.

Example 2 — Percentage Value

Use a percentage so spacing scales with font-size.

CSS
<style>
  p {
    font-size: 1.25rem;
    word-spacing: 15%;
  }
</style>

<p>The quick brown fox jumps over the lazy dog.</p>
Try It Yourself

How It Works

  1. Set font-size. Percentage spacing is calculated from this size.
  2. Use word-spacing: 15%. Larger type gets proportionally larger word gaps.
  3. Good for responsive type. Fixed px can look tight on small text and loose on large text.
  4. Compare with Example 1. Length vs percentage is the main design choice.

Example 3 — Negative Spacing

Pull words slightly closer with a small negative length.

CSS
<style>
  p {
    word-spacing: -2px;
  }
</style>

<p>The quick brown fox jumps over the lazy dog.</p>
Try It Yourself

How It Works

  1. Use a small negative. -2px tightens gaps without overlapping letters.
  2. Still additive. The value subtracts from the normal inter-word space.
  3. Test readability. Large negatives can make words collide — avoid that for body copy.
  4. Font dependent. The same value looks different across typefaces; check each one.

Edge Cases & Pitfalls

Most issues come from extreme values or mixing this up with letter spacing.

a11y

Extreme values hurt readability

Very large positives make sentences look disconnected. Large negatives can overlap words. Tune per font (WCAG 1.4.8).

vs letter

Not the same as letter-spacing

word-spacing changes gaps between words. letter-spacing changes gaps inside words.

%

Percentages follow font-size

A percentage is relative to the text’s font size, so it scales when type size changes — often better than fixed px for responsive type.

CJK

Fewer word spaces in some scripts

Languages that do not separate words with spaces show little or no effect. Latin, Cyrillic, and similar scripts show it clearly.

Browser Support

word-spacing is a browser CSS property for typography. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available

word-spacing

Widely supported across Chrome, Firefox, Safari, Edge, Opera, and older IE. Length, percentage, and normal are safe for production.

99% Global support
Google Chrome Supported
Full support
Mozilla Firefox Supported
Full support
Apple Safari Supported
Full support
Microsoft Edge Supported
Full support
Opera Supported
Full support
Samsung Internet Supported
Full support
Internet Explorer 6+
Full support
word-spacing Baseline · Widely available

Bottom line: Safe for everyday typography. Prefer modest values for accessibility. This is not a JavaScript runtime API.

Key Takeaways

  • Role: add or subtract space between words on top of the font’s normal gap.
  • Initial: normal. Inherited. Accepts length or percentage.
  • Prefer relative units (em, %) when font size can change.
  • Keep it readable: avoid extreme positives or negatives on body text.

One line: word-spacing is a small typography dial — nudge word gaps, don’t stretch sentences apart.

Frequently Asked Questions

It sets extra spacing between words (and between tags). The length or percentage is added on top of the font’s normal inter-word space.
The initial value is normal, which uses the spacing defined by the current font and browser.
word-spacing changes the gap between words. letter-spacing changes the gap between individual characters inside words.
Yes. Percentage values are calculated relative to the font-size of the affected text, so they scale when the font size changes.
Yes. Negative lengths pull words closer. Extreme values can make text hard to read — keep changes modest.
Yes. It applies to all elements (including ::first-letter and ::first-line) and is inherited. It is a browser CSS property, not a Node.js feature.

Next: word-wrap

Learn the legacy alias of overflow-wrap for long strings.

word-wrap tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful