Text Spacing
This lesson explains Text Spacing in web accessibility with clear examples, practical use cases, and implementation best practices.
Text Spacing Overview
Text spacing plays an important role in Web Accessibility by improving
readability for users with low vision, dyslexia, cognitive disabilities,
and other reading difficulties. Proper spacing between lines, words,
letters, and paragraphs makes content easier to scan and understand.
The Web Content Accessibility Guidelines (WCAG) recommend that websites
continue to function correctly when users increase text spacing using
browser extensions, custom stylesheets, or accessibility settings. Layouts
should adapt without clipping, overlapping, or hiding content.
| Feature | Benefit |
| Line Height | Improves readability and reduces eye strain. |
| Letter Spacing | Makes characters easier to distinguish. |
| Word Spacing | Improves word recognition. |
| Paragraph Spacing | Separates blocks of content clearly. |
| Responsive Layout | Prevents clipping and overlapping text. |
| WCAG Compliance | Supports accessible reading experiences. |
Accessible Text Spacing Example
body {
line-height: 1.5;
letter-spacing: 0.05em;
word-spacing: 0.15em;
}
p {
margin-bottom: 2em;
}
These spacing values improve readability while maintaining a clean layout.
Users who customize spacing through browser accessibility settings should
still be able to read the content without layout issues.
Recommended Text Spacing Guidelines
WCAG provides guidance for supporting increased text spacing. Websites
should remain fully functional when users apply these spacing adjustments.
| Property | Recommended Value | Purpose |
| Line Height | At least 1.5 | Improves readability. |
| Paragraph Spacing | At least 2 times the font size | Separates content sections. |
| Letter Spacing | At least 0.12em | Improves character recognition. |
| Word Spacing | At least 0.16em | Makes words easier to identify. |
| Responsive Design | No content loss | Maintains accessibility. |
| Flexible Layouts | Supports zoom and custom styles | Improves usability. |
Text Spacing Best Practices
| Best Practice | Description |
| Use Comfortable Line Height | Maintain sufficient spacing between lines. |
| Allow User Customization | Do not prevent browser or extension spacing adjustments. |
| Use Relative Units | Prefer em and rem for flexible layouts. |
| Avoid Fixed Heights | Prevent text clipping when spacing increases. |
| Test at High Zoom Levels | Ensure layouts remain readable. |
| Support Responsive Design | Allow content to reflow naturally. |
Common Text Spacing Mistakes
- Using fixed-height containers that clip text.
- Preventing users from adjusting text spacing.
- Using very small line-height values.
- Allowing text to overlap when spacing increases.
- Using absolute units that reduce flexibility.
- Ignoring spacing tests at 200% zoom.
- Creating layouts that break with browser accessibility settings.
- Optimizing only for visual appearance instead of readability.
Key Takeaways
- Proper text spacing improves readability and comprehension.
- Support increased spacing without breaking the layout.
- Use flexible CSS units such as em and rem.
- Avoid fixed heights that clip or overlap content.
- Test websites with browser zoom and custom text spacing.
- Accessible text spacing supports WCAG compliance and better usability.
Pro Tip
A good accessibility test is to increase browser zoom to 200% and apply
custom text spacing. If users can still read every paragraph without text
being cut off, overlapping, or requiring horizontal scrolling, your
layout is much more accessible.