top
Expand Minimize
This topic has not yet been rated - Rate this topic

word-spacing

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

Syntax

{ word-spacing: sSpacing }

Possible values

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.

Remarks

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.

Example

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>

Standards information

This property is defined in Cascading Style Sheets (CSS), Level 1 (CSS1) Ee371251.xtlink_newWindow(en-us,Expression.40).png.

Applies to

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

See also

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.