Skip to content
Tutorials Center
My learning

Topics

CSS Reference ยท Typography

The word-spacing property

Reference for the CSS word-spacing property: adding or removing space between words, length values, inheritance, justified text and live examples.

The word-spacing property changes the amount of space the browser draws between words. It adds to (or subtracts from) the normal width of each word separator, such as a regular space. Use it sparingly: a small positive value can open up tight display text, and a negative value can tidy a heading with wide gaps.

CSS
.title {
  word-spacing: 0.25em;
}

Try it

Narrow, normal and wide gaps
Combined with justified text

Syntax

CSS
word-spacing: normal | <length>;
  • Initial value: normal
  • Applies to: all elements; also ::first-letter and ::first-line
  • Inherited: yes
  • Animatable: yes, as a length
  • Computed value: an absolute length (normal computes to 0)

Values

Value Description
normal The default word separator width from the font.
<length> Extra space added to each word separator, for example 0.2em or 4px. Negative values pull words closer.

The CSS specification also allows percentages; check a compatibility table before relying on them.

Usage notes

  • What counts as a word separator. Mostly the space character (and similar separators such as the no-break space). Letters inside a word are not affected; use letter-spacing for that.
  • Prefer em. The gap then scales with the font size.
  • Justified text. text-align: justify distributes extra space between words too. word-spacing shifts the starting width, but the browser still adjusts gaps per line.
  • Scripts without spaces. Languages such as Chinese or Japanese normally have no spaces between words, so the property has little effect there.
  • Don't fake paragraph structure. Spacing words widely to create columns or alignment is fragile. Use real layout tools.
  • Accessibility. Overly wide or tight word gaps make text harder to read. Keep changes small for body text.

Browser support

Supported in every browser for length values.