CSS word-spacing Property
CSS word-spacing
property specifies the amount of space between words.
Usages
The following table outline the usages and version history of this property.
Default value: | normal |
Applies to: | All elements |
Inherited: | Yes |
Version: | CSS1 |
JavaScript Syntax: | object.style.wordSpacing = "15px" |
Syntax
Here is a syntax for the CSS word-spacing
property
word-spacing: normal | length | initial | inherit;
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
normal | Default. Specifies normal space between words |
length | Specifies an additional space between words in length value expressed in px, pt, cm, em, etc Negative values are also allowed |
initial | Sets default value of this property |
inherit | Inherits this property from its parent element |
Examples
The example below shows to sets word-spacing property.
p.one {
word-spacing: normal;
}
p.two {
word-spacing: 30px;
}
p.three {
word-spacing: 2cm;
}
Browser Compatibility
- Google Chrome 1+
- Mozilla Firefox 1+
- Internet Explorer 6+
- Opera 3.5+
- Safari 1+
Note: Here details of browser compatibility with version number may be this is bug and not supported. But recommended to always use latest Web browser.