W3cubDocs

/CSS

letter-spacing

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

Syntax

Values

normal
The normal letter spacing for the current font. Unlike a value of 0, this value allows the user agent to alter the space between characters in order to justify text.
<length>
Specifies extra inter-character space in addition to the default space between characters. Values may be negative, but there may be implementation-specific limits. User agents may not further increase or decrease the inter-character space in order to justify text.

Formal syntax

normal | <length>

Examples

HTML

<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>

CSS

.first-example  { letter-spacing: 0.4em; }
.second-example { letter-spacing: 1em; }
.third-example  { letter-spacing: -0.05em; }
.fourth-example { letter-spacing: 6px; }

Specifications

Browser compatibility

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 ? ? ? ? ? ? ?

See also

© 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