CSS letter-spacing attribute

Definition and usage

The letter-spacing property increases or decreases the spacing between characters (character spacing).

This property defines how much space is inserted between the text character boxes. Since the character shape is usually narrower than its character box, the specified length value adjusts the usual spacing between letters. Therefore, 'normal' is equivalent to a value of 0.

Note:Negative values can be used, which will make the letters closer together.

See also:

CSS tutorial:CSS Text

HTML DOM reference manual:letterSpacing property

Example

Set the letter spacing of h1 and h2 elements:

h1 {letter-spacing:2px;}
h2 {letter-spacing:-3px;}

Try it yourself

CSS syntax

letter-spacing: normal|length|initial|inherit;

Property value

Value Description
normal Default. Specifies that there is no additional space between characters.
length Define a fixed space between characters (negative values are allowed).
inherit Specifies that the letter-spacing property should inherit its value from the parent element.

Technical details

Default value: normal
Inheritance: yes
Version: CSS1
JavaScript syntax: object.style.letterSpacing="3px"

More examples

Specifying character spacing (letter spacing)
This example demonstrates how to increase or decrease the character spacing.

Browser support

The numbers in the table indicate the first browser version that fully supports this property.

Chrome IE / Edge Firefox Safari Opera
1.0 4.0 1.0 1.0 3.5