By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

CSS Word-spacing Property

The word-spacing property controls the space between words.

Edited: 2015-12-04 11:01

The CSS Word-spacing property controls the space between the words in a HTML element.

The Word-spacing property is typically applied on a parent element, rather than on paragraphs themselves

It is recommended that you leave this property to the browser-default, but if you do change the default value, we recommend using a relative unit such as em or % rather than raw pixels.

Possible Values

Read Units of Measurement to understand the values.

Inherited? YES!

CSS StyleSheet code example

p {
  word-spacing: 0.5em;
}

Word-spacing example

In this example we will set the spacing between words to 2em, which will create really large spaces between the words. A value of 0.5 may be more sensible if you decide to change this.

<div style="word-spacing:3em;">
  <p>As you can see, the word-spacing property is inherited from the parent div element, and the value of 3em, while working, is also quite extreme.</p>
</div>

The above will look like:

As you can see, the word-spacing property is inherited from the parent div element, and the value of 3em, while working, is also quite extreme.