CSS PROPERTIES
Expand All | Collapse All
CSS AT-RULES
Advertisements

CSS letter-spacing Property

Topic: CSS3 Properties ReferencePrev|Next

Description

The letter-spacing property sets the extra spacing between the letters of an element's text.

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

Default value: normal
Applies to: All elements. It also applies to ::first-letter and ::first-line.
Inherited: Yes
Animatable: Yes. See animatable properties.
Version: CSS 1, 2, 3

Syntax

The syntax of the property is given with:

letter-spacing length | normal | initial | inherit

The example below shows the letter-spacing property in action.

h1 {
    letter-spacing: -3px;
}
p {
    letter-spacing: 15px;
}

Note: The normal value is not equivalent to the length value 0 for letter-spacing property. If the value is normal, the space may be adjusted by the browser in order to justify text; if the value is 0, it cannot.


Property Values

The following table describes the values of this property.

Value Description
normal      
The spacing is the normal spacing for the current font. The space may be adjusted by the browser in order to justify text. This is default.
length A length value specifies extra space to be inserted between characters in addition to the default inter-character space. This space may not be adjusted by the browser in order to justify text.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element letter-spacing property.

Browser Compatibility

The etter-spacing property is supported in all major modern browsers.

Browsers Icon

Basic Support—

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

Further Reading

See tutorial on: CSS Text.

Related properties: white-space, word-spacing.

Advertisements
Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties