HTML & CSSEasy
What is letter-spacing?
letter-spacing adds or removes space between characters (tracking). Positive values spread letters apart and negative values pull them closer; using em units keeps the spacing proportional to the font size.
Values
normal(default): the font's built-in spacing.- A length:
0.05em,-0.02em,1px. Preferemso it scales with the text.
Typography guidelines
- ALL CAPS and small labels: add a little space (
0.05emto0.1em). Capitals are designed to sit next to lowercase letters and look cramped together. - Large display headings: a slight negative value (
-0.01emto-0.03em) often looks tighter and more polished; many design systems tighten headings this way. - Body text: leave it at
normal; the type designer already tuned it. - Monospace and code: do not adjust.
Accessibility
WCAG 1.4.12 (Text Spacing) requires that content still works when users increase letter spacing to 0.12em, so avoid fixed-height containers that clip text. Very tight spacing reduces legibility, especially for people with dyslexia.
Related properties
word-spacing: space between words.font-kerning: the font's pair-specific spacing (on by default).text-transform: uppercaseplus letter-spacing is the standard "eyebrow label" style.
Gotcha
Letter spacing is also added after the last character, which can make centered text look slightly off-center.
Code example
html
1<style>2 body { font-family: system-ui; max-width: 440px; }3 .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; color: #2b4bff; }4 .cramped { text-transform: uppercase; font-weight: 700; }5 h1 { font-size: 2.75rem; line-height: 1.05; margin: 4px 0; }6 .tight { letter-spacing: -0.03em; }7 .wide { letter-spacing: .3em; }8 .words { word-spacing: .6em; }9</style>10<p class="eyebrow">Interview prep</p>11<p class="cramped">Caps without letter-spacing look cramped</p>12<h1>Default heading</h1>13<h1 class="tight">Tightened heading</h1>14<p class="wide">Wide tracking</p>15<p class="words">Extra word spacing between words</p>
Practice this question
Open it in the study app to track progress, take notes, listen to the answer and work through the rest of the HTML & CSS set.