CSS word-spacing Property Tutorial

In this section, we will learn what the word-spacing property is and how to use it in CSS.

Click here to run the example of word-spacing property.

CSS Text Spacing: CSS word-spacing Property Definition and Usage

Depending on the type of font and style of a text content, sometimes it’s a good idea to increase the space between the words of a text content to help and increase the readability of that content.

Now CSS provided a property named `word-spacing` by which we can adjust the space between words.

CSS word-spacing Property Syntax

word-spacing: normal|length|initial|inherit;

CSS word-spacing Property Value

The value we set for this property can take every CSS supported unit including px, em, rem etc. but it’s best to use “em” unit because by increasing and decreasing the font size, the space between words will adjust as well.

Note: this property, by default, inherits its value from its parent.

Example: word-spacing in CSS

See the Pen word-spacing in CSS by Omid Dehghan (@enjoytutorials1) on CodePen.


Top Technologies