Text align
The text align class sets the text-align property. It controls the horizontal alignment of text within its container.
| CSS Shortcut class | Applied style |
|---|---|
|
|
|
|
|
|
|
|
Examples
Centre
text-center
This text is centred within its container.
<p class="text-center">
This text is centred within its container.
</p>
Justify
text-justify
This text is stretched to align evenly along the right and left edges of its container.
<p class="text-justify">
This text is stretched to align evenly along the right and left edges of its container.
</p>
Left
text-left
This text is aligned to the left edge of its container.
<p class="text-left">
This text is aligned to the left edge of its container.
</p>
Right
text-right
This text is aligned to the right edge of its container.
<p class="text-right">
This text is aligned to the right edge of its container.
</p>
xs:> 480pxsm:> 640pxmd:> 768pxlg:> 1024pxxl:> 1280px
<div class="xs:text-center ...">
...
</div>