Export (0) Print
Expand All

word-spacing

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

{ word-spacing: sSpacing }

sSpacing

Variant that specifies or receives one of the following 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).

The property has a default value of normal. It is inherited.

This property 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.

The following example shows how to use 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.word-spacing = 
       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 jumps over the lazy dog.
</span>

A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, CUSTOM, DD, DFN, DIV, DL, DT, EM, FIELDSET, FORM, HN, HTML, I, IMG, INPUT TYPE=BUTTON, INPUT TYPE=CHECKBOX, INPUT TYPE=FILE, INPUT TYPE=IMAGE, INPUT TYPE=PASSWORD, INPUT TYPE=RADIO, INPUT TYPE=RESET, INPUT TYPE=SUBMIT, INPUT TYPE=TEXT, LI, OL, P, S, SELECT, SPAN, SUB, TABLE, TBODY, TD, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

Community Additions

ADD
Show:
© 2014 Microsoft