CSS letter-spacing Property

CSS letter-spacing property specifies the amount of space between characters of text.

Usages

The following table outline the usages and version history of this property.

Default value: normal
Applies to: All elements
Inherited: Yes
Version: CSS1
JavaScript Syntax: object.style.letterSpacing = "2px"

Syntax

Here is a syntax for the CSS letter-spacing property

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

Property Values

The following table describes the values of this property.

Value Description
normal Default. Sets no extra space between characters
length Specifies a length value expressed in px, pt, cm, em, etc. that set extra space between characters
Negative values are also allowed
initial Sets default value of this property
inherit Inherits this property from its parent element

Examples

The example below shows to sets letter spacing values of the element.

p.one {
  letter-spacing: normal;
}
p.two {
  letter-spacing: .2rem;;
}
p.three {
  letter-spacing: 5px;
} 
p.four {
  letter-spacing: 0.4em;
} 
p.five {
  letter-spacing: -1px;
} 

Run it...   »

Browser Compatibility

  • Google Chrome 1+
  • Mozilla Firefox 1+
  • Internet Explorer 4+
  • Opera 3.5+
  • Safari 1+

Note: Here details of browser compatibility with version number may be this is bug and not supported. But recommended to always use latest Web browser.