CSS word-spacing property
CSS word-spacing Property
Description
The word-spacing property is used to modify the spacing between words.
Possible Values
- normal – The default word spacing remains unchanged. In effect, this is equivalent to setting the value to 0.
-
length – This will increase the spacing between words. The longer the length, the more space there is between words.
Applies to
All HTML elements.
DOM Syntax
object.style.wordSpacing = "10px";
Example
The following is an example showing how to set the spacing between words.
<html>
<head>
</head>
<body>
<p style = "word-spacing:5px;">
This text is having space between words.
</p>
</body>
</html>
This will produce the following result –