The letter-spacing
CSS property specifies the spacing behavior between text characters.
/* <length> values */ letter-spacing: 0.3em; letter-spacing: 3px; letter-spacing: .3px; /* Keyword values */ letter-spacing: normal; /* Global values */ letter-spacing: inherit; letter-spacing: initial; letter-spacing: unset;
Initial value | normal |
---|---|
Applies to | all elements. It also applies to ::first-letter and ::first-line . |
Inherited | yes |
Media | visual |
Computed value | an optimum value consisting of either an absolute length or the keyword normal
|
Animation type | a length |
Canonical order | the unique non-ambiguous order defined by the formal grammar |
normal
<length>
normal | <length>
<p class="first-example"> letter spacing </p> <p class="second-example"> letter spacing </p> <p class="third-example"> letter spacing </p> <p class="fourth-example"> letter spacing </p>
.first-example { letter-spacing: 0.4em; } .second-example { letter-spacing: 1em; } .third-example { letter-spacing: -0.05em; } .fourth-example { letter-spacing: 6px; }
Specification | Status | Comment |
---|---|---|
CSS Text Module Level 3 The definition of 'letter-spacing' in that specification. | Working Draft | No change. |
CSS Transitions The definition of 'letter-spacing' in that specification. | Working Draft | Defines letter-spacing as animatable. |
CSS Level 2 (Revision 1) The definition of 'letter-spacing' in that specification. | Recommendation | No change. |
Scalable Vector Graphics (SVG) 1.1 (Second Edition) The definition of 'letter-spacing' in that specification. | Recommendation | Initial SVG definition. |
CSS Level 1 The definition of 'letter-spacing' in that specification. | Recommendation | Initial definition. |
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 1 | Yes | 1 | 4 | 3.5 | 1 |
SVG support | Yes | ? | No | ? | Yes | Yes |
Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | Opera Android | iOS Safari | Samsung Internet |
---|---|---|---|---|---|---|---|
Basic support | ? | ? | Yes | 4 | ? | ? | ? |
SVG support | ? | ? | ? | ? | ? | ? | ? |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/letter-spacing