CSS word-spacing Property


The word-spacing property is similar to letter-spacing in that it controls the amount of space between words in a piece of text rather than individual characters.

The word-spacing can be set to one of three different values: The keyword "normal," which resets the default spacing, The length values can be expressed in any CSS unit & The "inherit" keyword, which uses the parent element's word spacing.

At this time, the best practice would be to use them. Because font size can be changed, using pixels for this could cause issues because the spacing between words would not scale as their size did. rem is great most of the time, but browser support is limited, and in this case, it's probably best if the spacing is relevant directly to the words being applied to, rather than the root.

Syntax

Example

Preview

Property Values

Value Description
normal Defines the standard space between words (0.25em). This is the default setting.
length Defines an extra space between words (in px, pt, cm, em, etc). Negative values are permitted. Learn more about length units.
initial This property is set to its default value.
inherit This property is inherited from its parent element.

Supported Browsers

Property Chrome Firefox Safari Edge / IE Opera
word-spacing 1.0 1.0 1.0 6.0 3.5