word-spacing (CSS property)
Example
This style rule adds half an em square of spacing between words in paragraph elements:
p {
word-spacing: 0.5em;
}
Description
The
word-spacing property sets the extra spacing between
words in the text content of an element.
Word spacing can be
affected by text justification (see the text-align
property).
When whitespace is preserved—see white-space—all space
characters are affected by word spacing.
Value
A length value specifies extra space to be inserted between words in addition to the default inter-word space.
Negative length values are legal.
A value of
normal means no extra space will appear between
words.
Compatibility
| IE | 5.5 | None |
|---|---|---|
| 6.0 | Full | |
| 7.0 | Full | |
| Firefox | 1.0 | Buggy |
| 1.5 | Buggy | |
| 2.0 | Buggy | |
| Safari | 1.3 | Full |
| 2.0 | Full | |
| 3.0 | Full | |
| Opera | 9.2 | Buggy |
| 9.5 | Buggy |
Internet Explorer for Windows versions up to and
including 7 don’t support the value inherit.
In Firefox versions up to and including 2, and in Opera versions up to and including 9.5, the whitespace between inline child elements has a minimum width of zero.
User-contributed notes
There are no comments yet.
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

