The word-spacing
property specifies the spacing between words.
This property accepts any CSS length value, such as, px
, %
, em
, and others.
Text with a 10-pixel word-spacing
between the words.
This text has a 10-pixel word spacing.
<p style="word-spacing: 10px">
This text has a 10-pixel word spacing.
</p>
word-spacing: normal | length | initial | inherit;
Value | Description |
---|---|
normal |
Default. Normal space between words, which is 0.25em. |
length |
Sets the space between words using any valid CSS unit. Accepts negative values. |
initial |
Sets the value to its default value. |
inherit |
Inherits the value from its parent element. |
This table shows when word-spacing
support started for each browser.
Chrome
|
1.0 | Dec 2008 |
Firefox
|
1.0 | Nov 2004 |
IE/Edge
|
6.0 | Aug 2001 |
Opera
|
3.5 | Nov 1998 |
Safari
|
1.0 | Jun 2003 |