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

CSS letter-spacing property

CSS letter-spacing property

Example

Set the letter spacing for h1 and h2 elements:

h1 {letter-spacing:2px}

h2 {letter-spacing:-3px}

Try it »


Property definition and usage

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

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

Browser support

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

property
letter-spacing 1.0 4.0 1.0 1.0 3.5

Attribute values

Value Description
normal Default. No extra space between characters.
length Defines a fixed space between characters (negative values are allowed).
inherit Specifies that the letter-spacing property should be inherited from the parent element.

Related Articles

CSS Tutorial: CSS Text