Techniques for WCAG 2.0

Skip to Content (Press Enter)

This document is a draft, and is designed to show changes from a previous version. It is presently showing added text,changed text,deleted text,[start]/[end] markers,and Issue Numbers.

Hide All Edits   |   Toggle Deletions  |   Toggle Issue Numbers   |   Toggle [start]/[end] Markers   |   Show All Edits

Changes are displayed as follows:


C19: Specifying alignment either to the left OR right in CSS


All technologies that support CSS

This technique relates to:


This technique describes how to align blocks of text either left or right by setting the CSS text-align property.


Example 1

In the following example, text is aligned left. In the style sheet, define the class:

Example Code:

p.left {text-align: left}

In the content call the up the class.

Example Code:

<p class="left"> Lorem ipsum dolor sit …</p>

Example 2

In the following example, text is aligned right.

Example Code:

p.right {text-align: right}

In the content call the up the class.

Example Code:

<p class="right"> Lorem ipsum dolor sit …</p>



  1. Check that the text is aligned either left or right.

Expected Results

If this is a sufficient technique for a success criterion, failing this test procedure does not necessarily mean that the success criterion has not been satisfied in some other way, only that this technique has not been successfully implemented and can not be used to claim conformance.