![]() |
VOOZH | about |
Bootstrap 5 text alignment classes are used to realign components with the start, end, and center variation. It can be used in the same viewport width breakpoints as the grid system.
Bootstrap 5 Text alignment Classes: Here * can be replacebale by start, end & center and ** can be replaceble by sm, md, lg & xl
| Class Name | Description |
|---|---|
| text-* | Aligns the component's text to the start, center, or end. |
| text-**-* | Aligns the component's text to the start, center, or end based on the screen size breakpoints. |
Syntax:
<tag class="text-start">...</tag>Note:
This class will work on paragraphs, headings, and anchor elements.
The below examples illustrate the Text Alignment:
Example 1: In this example, we will align the text to the right by using the text-end class.
Output:
Example 2: In this example, we will use all the alignment classes to see the impact of these classes.
Output: