HTML DOM wordSpacing Property
Complete Style Object Reference
Definition and Usage
The wordSpacing property sets the space between
words in a text.
Syntax
Object.style.wordSpacing=normal|length
|
Possible Values
Value |
Description |
normal |
Defines normal space between words |
length |
Sets a fixed space between words in px, cm, etc. Negative values are allowed |
Example
The following example changes the space between words:
<html>
<head>
<script type="text/javascript">
function changeWordSpacing()
{
document.getElementById("p1").style.wordSpacing="10px";
}
</script>
</head>
<body>
<p id="p1">This is an example paragraph</p>
<input type="button" onclick="changeWordSpacing()"
value="Change space between words" />
</body>
</html>
|
Try-It-Yourself Demos
wordSpacing - Change the space between the words in a text
Complete Style Object Reference
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|