CARVIEW |
Select Language
HTTP/2 200
date: Tue, 07 Oct 2025 21:12:03 GMT
content-type: text/html; charset=utf-8
content-encoding: gzip
content-location: C21.html
vary: negotiate,Accept-Encoding
tcn: choice
last-modified: Thu, 02 Oct 2025 20:17:10 GMT
cache-control: max-age=21600
expires: Wed, 08 Oct 2025 03:12:03 GMT
x-backend: www-mirrors
x-request-id: 98b064fc6adab22e
strict-transport-security: max-age=15552000; includeSubdomains; preload
content-security-policy: frame-ancestors 'self' https://cms.w3.org/ https://cms-dev.w3.org/; upgrade-insecure-requests
cf-cache-status: BYPASS
set-cookie: __cf_bm=VFvMQdU0H9x2kDaVeiquG1hTPFhNQmj5QO9UcChu7zE-1759871523-1.0.1.1-eV1uP7kNFCFi_TH6kBuD..lFGhk5Xef8BSL5xPukk2U7JHeyQIRIUZVbjOkcRA4tNHr77VVJWPshvoaQ60NUewVrMwngZFFpif4BzLBo68U; path=/; expires=Tue, 07-Oct-25 21:42:03 GMT; domain=.w3.org; HttpOnly; Secure; SameSite=None
server: cloudflare
cf-ray: 98b064fc6adab22e-BLR
alt-svc: h3=":443"; ma=86400
C21: Specifying line spacing in CSS | WAI | W3C
Skip to content
Back to Top
Examples of ways to meet WCAG; not required
About WCAG Techniques
Technique C21:Specifying line spacing in CSS
About this Technique
This technique relates to:
- 1.4.8: Visual Presentation (Sufficient)
- 1.4.12: Text Spacing (Advisory)
This technique applies to CSS.
Description
Many people with cognitive disabilities have trouble tracking lines of text when a block of text is single spaced. Providing spacing between 1.5 to 2 allows them to start a new line more easily once they have finished the previous one.
Examples
Example 1: Setting the element to 1.5 line height
In the style sheet set the characteristics of the element.
body { line-height: 1.5; }
This sets the line height of everything in the body of the document to 1.5.
Related Resources
No endorsement implied.
Tests
Procedure
- Open content in a browser.
- Check that the spacing between lines in blocks of text is between 1.5 and 2.
Expected Results
- Check #2 is true.