word-spacing
Description
word-spacing
defines the amount of whitespace between words in an element.
Item | Value |
---|---|
Initial value | normal |
Inherited | Yes |
Version | CSS1 |
JavaScript syntax | object.style.wordSpacing="5px" |
Applies to | All elements. |
Syntax and Property Values
word-spacing: length | normal | inherit
The property values are listed in the following table.
Value | Description |
---|---|
normal | Default value. Use normal space between words. |
length | space in px, pt, cm, em, etc. Negative values are allowed |
inherit | Inherit the word-spacing property from the parent element |
Example
<!DOCTYPE HTML>
<html>
<head>
<style>
p {<!--from w ww.j a v a 2 s. c om-->
word-spacing: -5px;
}
</style>
</head>
<body>
<p>
a negative value.
</p>
</body>
</html>
The code above generates the following result.