asp.net.ph

Skip Navigation Links

letter-spacing Attribute | letterSpacing Property

CSS Attributes Index   Text Attributes


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

Syntax


CSS { letter-spacing: 'normal' | length }
Script object.style.letterSpacing = sSpacing ]

Possible Values


normal Default spacing.
length Floating-point number and a valid CSS length unit: either an absolute units designator ( cm, mm, in, pt, pc, or px ) or a relative units designator ( em or ex ).

The property is read/write with a default value of normal; the CSS attribute is inherited.

Remarks

The attribute will add the appropriate letter spacing after each character. For the end of a word not to be affected by the spacing, place the last character outside the closing tag. Letter spacing can be influenced by justification. The length value indicates an addition to the default space between characters. Negative values are permitted.

Example

The following example demonstrates the effects of applying the different values possible for the CSS letter-spacing attribute.

 Show me 

The sample below uses inline event handlers to dynamically set an object’s letterSpacing property in response to mouse events.

p onmouseover="this.style.letterSpacing='1mm'"
   onmouseout="this.style.letterSpacing=''">
   ...
</p>

 Show me 

See Also

line-height



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note