CSS letter-spacing Property

Description

The letter-spacing property defines the spacing between characters within an element. Browsers usually set the distance between characters based on the type and type of font, its size and the settings of the operating system. To change this value, this property is applied. It is acceptable to use a negative value, but in this case you need to make sure that the readability of the text is maintained.

Initial value
normal
Applies to
All elements
Inherited
Yes
Computed value
An absolute length
Animatable
Yes
JavaScript syntax
object.style.letterSpacing

Interactive Demo

The rusty swing set creaked a lonely lullaby in the twilight, shadows lengthening like grasping fingers across the dew-kissed grass. A lone dandelion seed, adrift on the breeze, whispered secrets of faraway fields, of dandelion suns and galaxies spun from fluff. Somewhere, beyond the veil of dusk, a coyote laughed, echoing through the stillness like a forgotten memory.

Syntax

letter-spacing: normal | <length> 

Values

  • normalNo additional spacing is applied.
  • <length>Specifies additional spacing between characters. Values may be negative, but there may be implementation-dependent limits.
  • inherit

Example

<p class="test">letter-spacing: -1px</p> 
<p class="test2">letter-spacing: normal</p>
<p class="test3" >letter-spacing: 2px</p>
<p class="test4">letter-spacing: 10px</p>
.test {
   letter-spacing: -1px; 
}
.test2 {
   letter-spacing: normal;
}
.test3 {
   letter-spacing: 2px; 
}
.test4 {
   letter-spacing: 10px;
}

Browser Support

The following table will show you the current browser support for the CSS letter-spacing property.

Desktop
Edge Chrome Firefox Opera Safari
12113.51
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
18410.11137

Last updated by CSSPortal on: 2nd January 2024