Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Style letterSpacing Property

Style letterSpacing Property

Style Object Reference The Style object


Definition and Usage

The letterSpacing property sets or returns the space between characters in the text.

Syntax

Sets the letterSpacing property:

Object.style.letterSpacing="normal|

length

|inherit"

Returns the letterSpacing property:

Object.style.letterSpacing

Value Description
normal Default. Defines the normal space between characters.
length Defines the space between characters using units such as px, cm, etc. Negative values are allowed.
inherit The letterSpacing property value is inherited from the parent element.

Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the letterSpacing property.

**Note:** IE7 and earlier versions do not support the "inherit" value. IE8 supports "inherit" only if a !DOCTYPE is specified. IE9 supports "inherit".


Example

Example

Changes the space between characters:

Runoob Tutorial(runoob.com)

This is some text.


Try it »


Style Object Reference The Style object