CSS Property word-spacing

word-spacing defines the amount of whitespace between words in an element.


Initial value normal
Inherited Yes
Version CSS1
JavaScript syntax object.style.wordSpacing="5px"
Applies to All elements.

CSS Syntax

 word-spacing: length  | normal | inherit

Property Values

The property values are listed in the following table.

normal Default value. Use normal space between words.
length space in px, pt, cm, em, etc. Negative values are allowed
inherit Inherit the word-spacing property from the parent element

Browser compatibility

word-spacing Yes Yes Yes Yes Yes


An example showing how to use word-spacing CSS property.

      p {<!--from w w  w  . ja v a 2  s  .  c  o  m-->
          word-spacing: -5px;
        a negative value.

Click to view the demo