How to Center Text in WordPress

In this guide, we will discover: How to Center Text in WordPress – Easy Beginners Guide 2023
So, let’s begin!

Don’t know how to center text in WordPress? Read this guide as it teaches various methods to achieve that.

By Oluwaseun Bamisile | Updated March 24, 2023 | 8 minutes read

This guide demonstrates two methods to align text in a specific WordPress post/page to the middle. Precisely, you will learn how to execute the task using the text alignment tool in the WordPress block editor.

I will also teach you how to center-align text in a post or page using HTML. Asides from that, this guide provides the procedures needed to align text across your entire WordPress site to the middle using CSS.

Finally, you will find an FAQ section toward the concluding part of this guide. That section will offer answers to a couple of the questions people mostly ask relating to this guide’s topic.

How to Center Text in a Specific WordPress Post/Page

How To Center Text In A Specific WordPress Post/Page

There are two major ways you can align text to the middle in a WordPress post or page. You can either make use of the text alignment tool in the WordPress block editor or use HTML.

Well, the following sub-sections will demonstrate how to center-align text in a WordPress post/page using those methods.

Center Text in a Specific WordPress Post/Page Using Text Alignment Tool

  1. Sign in to your WordPress site’s backend dashboard using an administrator account. Then, click Posts or Pages among the options on the dashboard’s left pane, depending on where you want to center a text.
  1. Afterward, open the page/post where you wish to center the text by left-clicking its title. For this example, I will open an untitled post on our WordPress site.
How To Center Text In A Specific WordPress Post/Page
  1. When the post/page opens, click the block with the text you wish to align to the center. Now, click the Align icon in the toolbar above the block, then select Align text center from the displayed options.

Center Text in a Specific WordPress Post/Page Using HTML

  1. Log on to your WordPress site’s backend dashboard using an administrator account. Next, depending on where you want to center a text, click Posts or Pages among the options on the dashboard’s left pane.
How To Center Text In A Specific WordPress Post/Page
  1. Following that, left-click the title of the page/post where you want to center-align the text to open it. For this demonstration, I will open an untitled post on our WordPress site.
  1. When the page/post opens, click the Options icon (three vertical dots) at the top right corner. Then, select Code editor from the displayed options.
How To Center Text In A Specific WordPress Post/Page
  1. Now, input the following HTML code in the opening paragraph or header HTML tag that wraps around the text you want to align to the middle.
class="has-text-align-center"
  1. After doing that, click Exit code editor. Hence, the text will be aligned to the center – see the second screenshot.
How To Center Text In A Specific WordPress Post/Page

How to Center Text Across a WordPress Site

How To Center Text Across A WordPress Site

Interestingly, with a simple CSS code, you can align the text across your WordPress site to the middle. The step-by-step procedures below demonstrate how to achieve that.

  1. Log in to your WordPress site’s backend as an admin. Then, hover your mouse cursor on Appearance on the backend’s left pane and select Customize from the displayed options.
  1. On the Customize page, select Additional CSS on the left pane.
How To Center Text Across A WordPress Site
  1. Now, input the following CSS code in the Additional CSS input field.
.entry-content {
    text-align: center;
}
  1. Finally, click the blue Publish button at the top of the page to save the change.
How To Center Text Across A WordPress Site

Frequently Asked Questions

1. How Do I Change The Alignment Of Text In WordPress?

To change the alignment of text in a WordPress post or page, follow the steps below.
a) Sign in to your WordPress site’s backend dashboard using an administrator account.
b) Then, click Posts or Pages among the options on the dashboard’s left pane, depending on where you want to change the alignment of a text.
c) Afterward, open the page/post where you wish to change the alignment of the text by left-clicking its title.
d) When the post/page opens, click the block with the text you wish to change its alignment.
e) Now, click the Align icon in the toolbar above the block, then select your preferred alignment from the displayed options.

2. What Is An Alignment?

Alignment or align is a term used to describe how text is positioned in a paragraph.

3. Can I Align Text In WordPress?

Yes, you can align text in WordPress.

4. What Are The Types Of Alignment?

There are left alignment, right alignment, center alignment, and justified alignment.

5. Is WordPress Free?

Yes, WordPress is completely free.

My Final Thoughts

How To Center Text In WordPress

Aligning text to the middle in WordPress is a fundamental design skill that can help enhance the visual appeal and readability of your content. Moreover, center-aligned text can easily draw attention to important information on your website.

Also, it can make your site’s content appear more organized and professional. Fortunately, this guide provided multiple ways to center-align text in a specific WordPress post or page.

To be specific, we discussed how to perform the task using the text alignment tool in the WordPress block editor. We also learned how to execute the task using HTML.

Besides that, I also included steps to align text across your WordPress site to the middle using a simple CSS code in this guide.

Hopefully, you found this WordPress guide helpful. If you did, you could share your thoughts with our community platform at Itechguides Community Forum.

You may also ask questions or make comments regarding this article at Itechguides Community Forum. Our team and other community members will respond to your questions or comments as soon as possible.

Lastly, visit our WordPress & Websites How-to Guides page for more insightful guides like this.

References and Further Reading

  1. ultimateblocks.com – How To Align Text In WordPress (Left, Center, Or Right)
  2. Itechguides Community Forum
vote/تقييم

Avatar

is Senior Writer DZ-TECH, where he covers the world of technology, hacking, cybersecurity, surveillance and privacy.

Leave a Comment