Ben Borgers

How to center text using Tailwind CSS

June 10, 2022

Tailwind CSS includes a class for centering text that’s called text-center.

You can center text by adding that class. For example:

<p class="text-center">
  Hello, world!
</p>

More blog posts

Subscribe to my newsletter for a monthly round-up of new blog posts and projects I’m working on!

Twitter ↗ RSS feed ↗