How to use a text-align class inside a table with Bootstrap 5 and HTML?

Spread the love

Sometimes, we want to use a text-align class inside a table with Bootstrap 5 and HTML.

In this article, we’ll look at how to use a text-align class inside a table with Bootstrap 5 and HTML.

How to use a text-align class inside a table with Bootstrap 5 and HTML?

To use a text-align class inside a table with Bootstrap 5 and HTML, we can use various classes.

For instance, we write

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

to use text-start to left align text.

text-center center aligns text.

text-end right aligns text.

text-justify justifies text.

And text-nowrap stops text from wrapping.

Conclusion

To use a text-align class inside a table with Bootstrap 5 and HTML, we can use various classes.

Leave a Reply

Your email address will not be published. Required fields are marked *