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!

Subscribe to my newsletter!

A weekly round-up of new blog posts and updates to projects I’m working on.