CSS letter-spacing Property

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Typography

What You’ll Learn

The letter-spacing property controls the space between characters in text. It helps you improve readability, create typographic style, and make headings or labels stand out.

01

Character Gap

Space between letters.

02

Syntax

normal or length.

03

Positive

Spread letters apart.

04

Negative

Tighten spacing.

05

Inherited

Set on a parent.

06

Typography

Headings and UI text.

Introduction

The letter-spacing property in CSS is used to control the spacing between characters in text. By adjusting letter spacing, you can enhance the readability and visual appeal of your content.

This property is particularly useful for creating different typographic effects and ensuring that text fits well within its designated space. You will often see it on headings, buttons, navigation labels, and brand typography.

Definition and Usage

Apply letter-spacing to any text-containing element such as headings, paragraphs, links, buttons, or spans. It works with any font and combines well with text-transform, font-size, and font-weight.

💡
Beginner Tip

Small changes go a long way. Try values between 0.05em and 0.2em for headings before using large pixel values.

📝 Syntax

The syntax for the letter-spacing property is simple. It can be applied to any text-containing element:

syntax.css
selector {
  letter-spacing: value;
}

Basic Example

letter-spacing.css
h1 {
  letter-spacing: 2px;
}

Syntax Rules

  • The value can be the keyword normal or any valid CSS length.
  • Positive lengths increase space between characters.
  • Negative lengths decrease space between characters.
  • The property is inherited by child elements.
  • Relative units like em scale with the element’s font size.

⚡ Quick Reference

QuestionAnswer
Initial valuenormal
Applies toAll elements
InheritedYes
AnimatableYes, as a length
Common useHeadings, buttons, labels, and brand typography

💎 Property Values

The default value of letter-spacing is normal, which uses the spacing built into the font by the type designer.

ValueExampleMeaning
normalletter-spacing: normal;Default character spacing as specified by the font
Length (positive)letter-spacing: 2px;Increases space between characters
Length (negative)letter-spacing: -0.5px;Decreases space between characters
em unitletter-spacing: 0.1em;Scales spacing relative to font size
inheritletter-spacing: inherit;Inherits the value from the parent element
normal 2px 0.1em -0.5px

🎯 Default Value

The default value of the letter-spacing property is normal. This means the browser uses the font’s built-in character spacing. You only need to set letter-spacing when you want to deliberately widen or tighten text.

👀 Live Preview

Compare default spacing with wider letter spacing on the same heading text:

normal
Design System
0.15em
Design System

Examples Gallery

Apply different letter spacings to headings and paragraphs, style uppercase labels, use relative units, and store spacing in a CSS variable.

🔢 Basic Spacing

Start with the reference example — increased spacing on a heading and tighter spacing on a paragraph.

Example 1 — Heading and Paragraph

Apply different letter spacings to a heading and a paragraph.

letter-spacing.html
<style>
  h1 {
    letter-spacing: 2px;
  }
  p {
    letter-spacing: -0.5px;
  }
</style>

<h1>Increased Letter Spacing</h1>
<p>This paragraph has slightly decreased letter spacing.</p>
Try It Yourself

How It Works

The heading uses 2px to spread characters apart for emphasis. The paragraph uses -0.5px to tighten body text slightly.

Example 2 — Uppercase Navigation Label

Wide letter spacing pairs well with uppercase text in navigation and buttons.

letter-spacing-nav.css
.nav-link {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 600;
}
Try It Yourself

How It Works

Uppercase letters can feel cramped. Adding 0.12em of letter spacing improves legibility and gives nav links a polished look.

🎨 Responsive & Theme Spacing

Use relative units and CSS variables so letter spacing scales with your design system.

Example 3 — Relative em Units

Use em so letter spacing grows and shrinks with font size.

letter-spacing-em.css
.hero-title {
  font-size: 2.5rem;
  letter-spacing: 0.05em;
}

.hero-subtitle {
  font-size: 1rem;
  letter-spacing: 0.05em;
}
Try It Yourself

How It Works

Because em is relative to font size, both the title and subtitle get proportionally similar spacing without separate pixel values.

Example 4 — Theme Variable

Store letter spacing in a custom property for consistent typography across your site.

letter-spacing-var.css
:root {
  --heading-track: 0.08em;
}

h1, h2, h3 {
  letter-spacing: var(--heading-track);
}
Try It Yourself

How It Works

Changing --heading-track once updates every heading that references the variable.

♿ Accessibility

  • Keep body text readable — Avoid extreme negative spacing on long paragraphs.
  • Do not rely on spacing alone — Headings still need proper semantic tags and contrast.
  • Test with zoom — Very tight or wide spacing can become harder to read when text is enlarged.
  • Consider dyslexia-friendly settings — Some users prefer default font spacing; use custom spacing sparingly on body copy.
  • Pair with sufficient line-height — Character spacing and line spacing work together for readability.

🧠 How letter-spacing Works

1

You set a spacing value

Apply letter-spacing with normal or a length such as 0.1em.

CSS rule
2

Browser adjusts glyph gaps

Extra space is added or removed between each character in the element’s text.

Rendering
3

Inheritance spreads the style

Child text elements inherit the spacing unless they override it with their own rule.

Cascade
=

Refined typography

Headings, labels, and brand text gain clearer rhythm and visual character.

🖥 Browser Compatibility

The letter-spacing property is widely supported across all major modern browsers, including Chrome, Firefox, Safari, Edge, and Opera. It is a reliable property for controlling text appearance.

Universal · All browsers

Typography control everywhere

letter-spacing has been supported since early CSS versions. You can use it safely in any web project.

99% Global browser support
Google Chrome All versions · Desktop & Mobile
Full support
Mozilla Firefox All versions · Desktop & Mobile
Full support
Apple Safari All versions · macOS & iOS
Full support
Microsoft Edge All versions · Legacy & Chromium
Full support
Opera All versions · Modern & legacy
Full support
letter-spacing property 99% supported

Bottom line: Safe to use everywhere. Still preview your typography in the browsers your audience uses.

🎉 Conclusion

The letter-spacing property is an effective tool for web designers looking to refine the presentation of text on their websites. Whether you’re aiming for a particular aesthetic or need to adjust text for better readability, controlling letter spacing can make a significant difference.

Experiment with different values to see how this property can enhance the typography of your content. Start with small em adjustments on headings and labels, then explore negative values only where tighter text truly helps the design.

💡 Best Practices

✅ Do

  • Use em for spacing that scales with font size
  • Apply wider spacing to uppercase headings and labels
  • Store brand tracking values in CSS variables
  • Test readability on mobile and large screens
  • Combine with text-transform for polished UI text

❌ Don’t

  • Over-tighten long body paragraphs with large negative values
  • Use extreme spacing that hurts readability
  • Confuse letter-spacing with word-spacing
  • Apply heavy tracking to every element on the page
  • Forget to check contrast when styling small tracked text

Key Takeaways

Knowledge Unlocked

Five things to remember about letter-spacing

Use these points when styling text with CSS.

5
Core concepts
normal 02

Default normal

Font default.

Default
+/- 03

Positive & negative

Widen or tighten.

Values
em 04

Relative units

Scales with text.

Pattern
05

Readability

Use with care.

A11y

❓ Frequently Asked Questions

The letter-spacing property controls the amount of space between characters in text. Positive values spread letters apart; negative values pull them closer together.
The default value is normal, which uses the spacing designed into the font by the type designer.
Yes. Negative values such as -0.5px tighten character spacing. Use small negative values carefully so text stays readable.
Yes. letter-spacing is inherited, so setting it on a parent element affects nested text unless a child overrides it.
letter-spacing adjusts space between individual characters. word-spacing adjusts space between whole words.

Practice in the Live Editor

Open the HTML editor, adjust letter-spacing on headings and paragraphs, and preview typography instantly.

HTML Editor →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful