CSS word-spacing
Property
Topic: CSS3 Properties ReferencePrev|Next
Description
The word-spacing
CSS property sets the spacing between the words in the text content.
The following table summarizes the usages context and the version history of this property.
Default value: | normal |
---|---|
Applies to: | All elements. It also applies to ::first-line. |
Inherited: | yes |
Animatable: | Yes. See animatable properties. |
Version: | CSS 1, 2, 3 |
Syntax
The syntax of the property is given with:
The example below shows the word-spacing
property in action.
Example
Try this code »p {
word-spacing: 50px;
}
Property Values
The following table describes the values of this property.
Value | Description |
---|---|
length | Specifies the extra spacing between words as a length value in px , pt , cm , em , etc. Negative length values are allowed. |
normal |
Specifies the normal word spacing, as defined by the current font and/or the browser. This is default value. |
initial |
Sets this property to its default value. |
inherit |
If specified, the associated element takes the computed value of its parent element word-spacing property. |
Browser Compatibility
The word-spacing
property is supported in all major modern browsers.
Basic Support—
|
Further Reading
See tutorial on: HTML Text Formatting.
Related properties: letter-spacing
, white-space
.