Uncle Jim's
Web Site Creations

JavaScript Examples


In Microsoft Internet Explorer, you can use the letter-spacing style to specify the white space between individual letters. The letter-spacing style isn't in the Netscape Navigator DOM.

You can use any of the standard measurement units (pt, px, cm, mm, in) to specify the value of a letter-spacing attribute. You can also use em values. An em is a printer's term that refers to the width of the capital M in the current font. Additionally, some word values are available to you:

  1. - normal--Denotes normal letter spacing.
  2. - auto--Denotes "justified" letter spacing, in which a single-line span fills the width of the browser window. This value isn't implemented in either major browser.

Here are some illustration below:

<SPAN style="letter-spacing:normal">This is normal text.<SPAN>
RESULTS:   This is normal text.
<SPAN style="letter-spacing:2em">Text with 2-em spacing.<SPAN>
RESULTS:  Text with 2-em spacing.
<SPAN style="letter-spacing:5px">Text with five-pixel spacing<SPAN>
RESULTS:  Text with five-pixel spacing.
<SPAN style="letter-spacing:6pt">Text with six-point spacing.<SPAN>
RESULTS:  Text with six-point spacing.
<SPAN style="letter-spacing:0.5cm">Text with half-centimeter spacing.<SPAN>
RESULTS:  Text with half-centimeter spacing.
<SPAN style="letter-spacing:2mm">Text with two-millimeter spacing.<SPAN>
RESULTS:  Text with two-millimeter spacing.
<SPAN style="letter-spacing:0.25in">Text with quarter-inch spacing.<SPAN>
RESULTS:  Text with quarter-inch spacing.
<SPAN style="font-weight:normal">This is normal text.<SPAN>
RESULTS:  This is normal text.

Close This Window