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. |
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 |
word-spacing |
Yes | Yes | Yes | Yes | Yes |
An example showing how to use word-spacing CSS property.
<!DOCTYPE HTML>
<html>
<head>
<style>
p {<!--from w w w . ja v a 2 s . c o m-->
word-spacing: -5px;
}
</style>
</head>
<body>
<p>
a negative value.
</p>
</body>
</html>