Language References
Sets or retrieves the amount of additional space between words in the object.
CSS |
{ word-spacing: 'normal' | length } |
Script |
object.style.wordSpacing [ = sSpacing ] |
normal |
Default spacing. |
length |
Floating-point number and a valid CSS length unit: either an absolute units designator ( cm, mm, in, pt, pc, or px ) or a relative units designator ( em or ex ). |
The property is read/write with a default value of normal; the cascading stylesheet ( CSS ) attribute is inherited.
The word-spacing attribute is only available on the Macintosh as of Microsoft® Internet Explorer® 4.01.
The attribute will add the specified spacing after each word. Word spacing can be influenced by justification.
The length value indicates an addition to the default space between words. Negative values are permitted.
The following sample demonstrates the use of the word-spacing attribute.
<style>
.spacing{word-spacing: 10;}
</STYLE>
<script language="JavaScript">
function fnChangeSpace ( ) {
oSpan.style.wordSpacing =
oSelSpace.options [ oSelSpace.selectedIndex ] .text;
}
<select ID = oSelSpace onchange = "fnChangeSpace ( )">
<option>10
<option>15
<option>20
</select>
<span ID = oSpan CLASS = ".spacing">
The quick brown fox jumps over the lazy dog.
</span>
This feature requires Microsoft® Internet Explorer® 4.0 or later.
Show me
Note Objects that expose this style as of Internet Explorer® 4.0 or later are accessible through script using the style object, and are accessible in Internet Explorer® 5 or later using the currentStyle object.