Typography
Utilities for controlling the alignment of text.
Class | Styles |
---|---|
text-left | text-align: left; |
text-center | text-align: center; |
text-right | text-align: right; |
text-justify | text-align: justify; |
text-start | text-align: start; |
text-end | text-align: end; |
Use the text-left
utility to left align the text of an element:
Use the text-right
utility to right align the text of an element:
Use the text-center
utility to center the text of an element:
Use the text-justify
utility to justify the text of an element:
Prefix a text-align
utility with a breakpoint variant like md:
to only apply the utility at medium screen sizes and above:
<p class="text-left md:text-center ..."> <!-- ... --></p>
Learn more about using variants in the variants documentation.