Skip to content Skip to main navigation Report an accessibility issue

Align Classes

Documentation

Usage: You can align text in a variety of ways by adding classes.

Do
  • Use these classes sparingly, consistently and thoughtfully.
  • Remember that in the English language we read from left to right.
Don't
  • Avoid realigning text simply because you think it looks better a certain way. Centered text can cause difficulty for users with dyslexia. Justified text at certain screen-sizes can cause large gaps in words causing difficulty for everyone.
EXAMPLE

Left aligned text.

Center aligned text.

Right aligned text.

Justified text.

No wrap text.

Code

HTML
<p class="text-left">Left aligned text.</p>
<p class="text-center">Center aligned text.</p>
<p class="text-right">Right aligned text.</p>
<p class="text-justify">Justified text.</p>
<p class="text-nowrap">No wrap text.</p>