Name

word-spacing

Values:

<length> | normal | inherit

Initial value:

normal

Applies to:

All elements.

Inherited:

Yes.

Computed value:

For normal, the absolute length 0; otherwise, the absolute length.

Description:

This defines the amount of whitespace to be inserted between words in an element. For the purposes of this property, a word is defined to be a string of characters surrounded by whitespace. Length values create a modifier to the usual spacing between words; thus, normal is synonymous with 0. Negative length values are permitted and will cause words to bunch closer together.

Examples:

p.spacious {word-spacing: 0.5em;}
em {word-spacing: 5px;}
p.cramped {word-spacing: −0.2em;}

Supported by:

Firefox, Internet Explorer, Opera, Safari.

Get CSS Pocket Reference, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.