This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

letter-spacing

Summary

The letter-spacing CSS property specifies the spacing behavior between text characters.

Overview table

Initial value
normal
Applies to
All elements
Inherited
Yes
Media
visual
Computed value
normal or absolute length
Animatable
No
CSS Object Model Property
letterSpacing

Syntax

  • letter-spacing: length
  • letter-spacing: normal

Values

normal
The spacing is the normal spacing for the current font.
length
Indicates inter-character space in addition to the default space between characters, followed by an absolute units designator (cm, mm, in, pt, or pc) or a relative units designator (em, ex, or px). Values may be negative, but there may be implementation-specific limits.

Examples

A selection of examples showing some typical uses of the letter-spacing property.

<p>This is a simple paragraph with the default value for letter-spacing.</p>

<p class="pos">This is a simple paragraph with a altered letter-spacing value by 0.3em.</p>

<p class="neg">This is a simple paragraph withe a altered letter-spacing value by -0.1em</p>

View live example

p {
    letter-spacing: normal;
}

p.pos {
    letter-spacing: .3em;
}

p.neg {
    letter-spacing: -.1em;
}

Usage

 * Up to three different values can be specified, in the following order: optimum, minimum, maximum
  • If one value is specified, it is used for all spacing. If two values are specified, the first is used for the optimum and minimum spacings, and the second is used for maximum.

Notes

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.

Related specifications

CSS Text Module Level 3
W3C Working Draft

See also

Related articles

Text

Other articles

Attributions