word-spacing

The property word-spacing sets the spacing between words, either a positive or a negative value.

Initial Value normal
Applies to All elements, including ::first-letter and ::first-line
Inheritance yes
Animation length values

The property value for word-spacing is any unit for dimensions except percent. A negative value is allowed. The default value normal allows the browser to calculate the word spacing on its own.

If the text is aligned with text-align: justify;, word-spacing will be set automatically, but not less than a specified value.

Syntax

/* Keyword value */

word-spacing: normal;

/* Length values */

word-spacing: 2px;
word-spacing: 0.2em;
word-spacing: -0.2rem;

/* Global values */

word-spacing: inherit;
word-spacing: initial;
word-spacing: revert;
word-spacing: unset;

Description

valuewhat it does
normalDefault value. The browser sets the spacing between words.
unitsSets additional spacing between words, given in CSS length units – pixels (px), centimeters (cm), points (pt), etc. It is allowed to use negative values.
inheritThe value is inherited from the parent element.
initialSets the default value.

Example

word-spacing: normal;

Mauris sollicitudin odio id risus condimentum porta.

word-spacing: 10px;

Mauris sollicitudin odio id risus condimentum porta.

word-spacing: -10px;

Mauris sollicitudin odio id risus condimentum porta.

word-spacing: 2em;

Mauris sollicitudin odio id risus condimentum porta.

word-spacing: -2em;

Mauris sollicitudin odio id risus condimentum porta.