word-spacing Attribute | wordSpacing Property

DHTML, HTML, & CSS

word-spacing Attribute | wordSpacing Property


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

Syntax

HTML{ word-spacing: sSpacing }
Scriptingobject.style.wordSpacing [ = sSpacing ]

Possible Values

sSpacing String that specifies one of the following values:
normalDefault spacing.
lengthFloating-point number, followed by an absolute units designator (cm, mm, in, pt, pc, or px) or a relative units designator (em or ex). For more information about the supported length units, see CSS Length Units.

The property is read/write with a default value of normal; the cascading style sheets (CSS) attribute is inherited.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see dynamic propertiesInternet Link.

Remarks

The word-spacing attribute is available only on the Macintosh, beginning with Internet Explorer 4.01.

The 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.

Example

This example uses the word-spacing attribute and the wordSpacing property to increase the amount of space between words in a SPAN.

Sample Code

<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>

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, custom, DD, DFN, DIR, 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, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.