word-spacing property (Internet Explorer)

Switch View :
ScriptFree
word-spacing property

[This documentation is preliminary and is subject to change.]

Sets or retrieves the amount of additional space between words in the object.

CSS 2.1, Section 5.4.1

Syntax

word-spacing: normal | <length>

Property values

normal

Default. Default spacing.

length

Floating-point followed by an absolute units designator (cm, mm, in, pt, or pc) or a relative units designator (em, ex, or px). For more information about the supported length units, see CSS Values and Units Reference.

CSS information

Applies ToAll elements
Mediavisual
Inherited1
Initial Value

Standards information

Remarks

This attribute adds the specified spacing after each word. Justification can influence word spacing.

The length value indicates an addition to the default space between words. Negative values are permitted.

In Microsoft Internet Explorer 6, This property now applies to the currentStyle element.

Examples

The following example shows how to use the word-spacing attribute and the word-spacing property to increase the amount of space between words in a span.


<STYLE>
   SPAN.spacing{word-spacing: 10;}
</STYLE>
<SCRIPT>
function fnChangeSpace(){
    oSpan.style.wordSpacing = 
       oSelSpace.options[oSelSpace.selectedIndex].text;
}
</SCRIPT>
<SELECT ID = "oSelSpace" onchange = "fnChangeSpace()">
   <OPTION>10
   <OPTION>15
   <OPTION>20
</SELECT>
<SPAN ID = "oSpan" CLASS = "spacing">
The quick brown fox jumped over the lazy dog.
</SPAN>

See also

CSSStyleDeclaration
currentStyle
runtimeStyle
style
CSS Enhancements in Internet Explorer 6

 

 

Build date: 3/14/2012