letter-spacing property
Sets or retrieves the amount of additional space between letters in the object.
![]() |
Syntax
letter-spacing: normal |
<length>
| inherit
Property values
normal-
Default. Default spacing.
- length
-
Floating-point number, followed by an absolute units designator (
cm,mm,in,pt, orpc) or a relative units designator (em,ex, orpx). For more information about the supported length units, see CSS Values and Units Reference. inherit
CSS information
| Applies To | All elements |
|---|---|
| Media | visual |
| Inherited | 1 |
| Initial Value |
Standards information
- CSS 2.1, Section 5.4.2
Remarks
When specified as a positive length value, the letter-spacing attribute adds the specified value to the default spacing between characters within an element. A negative length value decreases the space between characters. Letter spacing can be influenced by justification.
Examples
The following examples use the letter-spacing attribute and the letter-spacing property to change the space between letters.
This example uses blockquote as a selector to change the spacing to -0.2 millimeters for all blockquote objects on the page.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/letter-spacing.htm
<STYLE>
BLOCKQUOTE { letter-spacing:-0.2mm }
</STYLE>
This example uses inline scripting to set the spacing to 1 millimeter when an onmouseover event occurs.
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/letterSpacing.htm
<DIV STYLE="font-size:14" onmouseover="this.style.letterSpacing='1mm'"> : </DIV>
See also
Send comments about this topic to Microsoft
Build date: 11/29/2012
