Style wordSpacing property
The Style object
Definition and Usage
The wordSpacing property sets or returns the spacing between words in text.
Syntax
Set the wordSpacing property:
Object.style.wordSpacing="normal|
length
|inherit"
Return the wordSpacing property:
Object.style.wordSpacing
| Value | Description |
|---|---|
| normal | Default. Defines the standard spacing between words. |
| length | Defines the spacing between words using units such as px and cm. Negative values are allowed. |
| inherit | The value of the wordSpacing property is inherited from the parent element. |
Browser support





All major browsers support the wordSpacing property.
**Note:** IE7 and earlier versions do not support the "inherit" value. IE8 supports "inherit" only if a !DOCTYPE is specified. IE9 supports "inherit".
Example
Example
Change the spacing between words:
This is some text.
Try it »
The Style object