Justify Text in WordPress Gutenberg


We will share the steps to Justify Text in WordPress Gutenberg through this article. We will not add fancy text or exciting story around this article and will keep it brief.


Applies only to sites hosted on WordPress.com

These steps need Custom CSS Options available which are features of WordPress.Com Premium and Business Plans. If you haven’t already brought the WordPress.Com Premium and Business Plan, you should consider one in order to gain more flexibility with your WordPress.com Site/Blog.

Good to have Knowledge

You should know a little bit of CSS or at least possess some basic understanding of the CSS to achieve this. Do not panic if you are unaware of what is CSS and how it works. We will share all the needed steps through this article to make it easy for you.

If you follow the steps as directed, you should be good to go.

Steps to Justify Text in WordPress Gutenberg

  • Add text block using the WordPress Gutenberg
  • Now add a custom class name under Advanced section (Found in the block settings. (in this case, we have added justify as a CSS class)
Justify Text in WordPress Gutenberg

Where to put the Custom CSS code in WordPress?

p.justify {
	text-align: justify;

Save the Post/Page and view it in the frontend. We hope you find this procedure of justifying text in Gutenberg helpful.

In case you want to justify all the paragraph/text blocks, use the following code. In this case, you do not need to add any custom class to the Gutenberg blocks.

p {
    text-align: justify;

We are certain Justify option will soon be available in WordPress Gutenberg, however, in the meantime, you can use this to keep up with your articles.

We hope you find this article useful. In case you are stuck and or need help, feel free to drop a comment below or submit your question. Do share it further and add your feedback about the article in the comments section.

About Syed Hussaini

I am a Support Specialist with 15+ Years of experience and exposure in Training, website development on WordPress, Joomla, and Google Sites, Customer Support, IT Operations, Team Management, Knowledge Management. My engagement in a corporate environment and freelance projects has taught me to be highly productive and independent.

11 Responses

  1. Hello Syed,

    Me again 🙂 . If I selected ‘verse’ in the block, The lines are not coming in to Justify like others. Is it possible to set Justify for Verse too?


      1. Hello Syed Thanks for your reply.

        https://www.giriblog.com/grammarly/ In this link you can see Verse (green lines part) is not in justify format. Logically it should be in justify. I’m not sure why it’s not.

        It’s not a BIG problem for me since you already helped me the major part but if you have solution for this too then will be happy 🙂 .


      2. Hello Syed,
        Thank you for your help. It’s working fine 🙂 .
        I’m using Newspaper theme, and it suggested me to remove “pre” and showed exclamation mark.
        So I removed pre and the alert message gone, but both codes are working. FYI
        You are helping me a lot. Thank you Syed for your time.

        Liked by 1 person

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.