Text align center

Bootstrap 5 Text align center component

Responsive text align center built with Bootstrap 5. Easily center-align your text for better readability and a polished, professional web design.


Basic example

Easily realign text to components with text alignment classes. For left, right, and center alignment, responsive classes are available that use the same viewport width breakpoints as the grid system.

Left aligned text on all viewport sizes.

Center aligned text on all viewport sizes.

Right aligned text on all viewport sizes.

Center aligned text on viewports sized SM (small) or wider.

Center aligned text on viewports sized MD (medium) or wider.

Center aligned text on viewports sized LG (large) or wider.

Center aligned text on viewports sized XL (extra-large) or wider.

        
            
      <p class="text-start">Left aligned text on all viewport sizes.</p>
      <p class="text-center">Center aligned text on all viewport sizes.</p>
      <p class="text-end">Right aligned text on all viewport sizes.</p>

      <p class="text-sm-center">Center aligned text on viewports sized SM (small) or wider.</p>
      <p class="text-md-center">Center aligned text on viewports sized MD (medium) or wider.</p>
      <p class="text-lg-center">Center aligned text on viewports sized LG (large) or wider.</p>
      <p class="text-xl-center">Center aligned text on viewports sized XL (extra-large) or wider.</p>