CARVIEW |
Select Language
HTTP/2 200
date: Wed, 08 Oct 2025 19:21:35 GMT
content-type: text/html; charset=utf-8
content-encoding: gzip
content-location: C19.html
vary: negotiate,Accept-Encoding
tcn: choice
last-modified: Thu, 02 Oct 2025 20:17:10 GMT
cache-control: max-age=21600
expires: Thu, 09 Oct 2025 01:21:35 GMT
x-backend: www-mirrors
x-request-id: 98b8008c58f9c1cc
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=KqPGF2IBgzYKR_l_.jCOx.GlZ4bMpIE_wfXhXHXNK4Y-1759951295-1.0.1.1-fWL6S07TOhTrB0Xy06aeYcFrLXp5VjgbDNDEbBumbHjkcgx9eD7Tnq.24ftG1aqC2WrR0SnPM2UoQo0XKjQEm5LKtwE_niVTx.tcacr452c; path=/; expires=Wed, 08-Oct-25 19:51:35 GMT; domain=.w3.org; HttpOnly; Secure; SameSite=None
server: cloudflare
cf-ray: 98b8008c58f9c1cc-BLR
alt-svc: h3=":443"; ma=86400
C19: Specifying alignment either to the left or right in CSS | WAI | W3C
Skip to content
Back to Top
Examples of ways to meet WCAG; not required
About WCAG Techniques
Technique C19:Specifying alignment either to the left or right in CSS
About this Technique
This technique relates to 1.4.8: Visual Presentation (Sufficient).
This technique applies to CSS.
Description
This technique describes how to align blocks of text either left or right by setting the CSS text-align property.
Examples
Example 1: Aligning text to the left
In the following example, text is aligned left. In the style sheet, define the class:
p.left {text-align: left}
In the content call the up the class.
<p class="left"> Lorem ipsum dolor sit ...</p>
Example 2: Aligning text to the right
In the following example, text is aligned right.
p.right {text-align: right}
In the content call the up the class.
<p class="right"> Lorem ipsum dolor sit ...</p>
Tests
Procedure
- Check that the text is aligned either left or right.
Expected Results
- Check #1 is true.