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>