CSS word-spacing property

Description

CSS word-spacing property adds or removes extra spacing between the words. A sentence may shrink or expand depending upon the value of word-spacing.

Syntax

word-spacing : normal | length

Property values

normalDefault

represents no additional spacing.

word-spacing: normal;

+ve length

+ve value adds extra spacing between the words in addition to the default spacing defined by font (expanding behavior).

word-spacing: 10px;

-ve length

-ve value removes spacing between the words (contracting behavior).

word-spacing: -10px;

Applicable to

It applies to inline boxes e.g. the text content within block-level element..

#CSS digger
Was this article helpful?

 
Observe the behavior of word-spacing for different values such as normal, length.
×

Ctrl+D