How to Justify Text in WordPress in A Few Steps

Justifying text is as easy as clicking one button in Word, Word Editor, and Google Docs.

It used to be that simple too in WordPress. But WordPress removed the text justification option since the release of version 4.7.

Since that version, the button that quickly justifies text is gone. The reason for this is that justifying text is a hard thing to do in different web browsers.

A neatly justified text in one browser will not look the same in another browser or on a different screen size. Because of this responsiveness issue, WordPress removed this button from its toolbar.

However, with a few tricks, it is still possible. This quick guide will show how to justify text in WordPress.

It assumes the use of WordPress 5.1 or higher, as well as the use of the Gutenberg editor.

What is Justified Text

To justify text means to align the text margins on both the left and right sight of the column. The result is a clean look on both sides of a post or page.

To achieve this alignment, the software adds spaces between words as needed.

This requires an adjustment of spacing between words as determined by the font. When sentences are of sufficient length, this will not be a problem.

Some people like text justification but others do not. It is a matter of preference and it is not a recognized sign of professionalism.

For example, some leading American newspapers and magazines justify, and others align-left only. Books normally use text justification.

An advantage of justification is that it provides an element of visual clarity. It limits where text and text blocks end.

This results in clean-looking blogs and posts.

Outlined below are the steps to take to justify text in WordPress. First, a look at the easy approach.

Justify Text Using Simple Shortcut Keys

These are the steps to justify text in the WordPress editor:

  1. Log in to your WordPress editor.
  2. Select the text to justify.
  3. Use the keyboard shortcut:
  • Windows: Ctrl + Alt + J
  • Mac: Ctrl + Option + J

The selected text is now justified.

This is the easy way to justify text in WordPress. Most of the time, this method works without any problems.

Sometimes, this approach does not work. An alternative is to use a plugin that justifies text.

Install a Suitable Plugin

WordPress plugins help to automate certain tasks. Some use WordPress to post on a regular basis and plugins help to make all the posts look the same.

Install and activate the plugin once and it will take over many repetitive tasks. There are also plugins available that perform text adjustments, like justification.

Here are four examples of plugins that do that:

Re-add text justify button

This plugin re-adds the justify button to the WYSIWYG in WordPress 4.7 and later version. To do this, it is important to use the Classic Editor and not the Block Editor.

Advanced Editor Tools (previously TinyMCE Advanced)

This plugin adds various advanced formatting tools and styles to the WordPress Editor.Once installed, users can add different buttons to the toolbar, such as a Justify button.

Who stole the text justify button?

This plugin works in a similar way to the first two.

It adds a justify button to the WordPress editor toolbar. This will appear in the second row of buttons.

PRyC WP: TinyMCE More Buttons

The name of this plugin says it all. It does not only add the Justify button to the post editor but many more.

For example, it also adds the underline button. This is a good choice for those that need more styling options than WordPress editor offers.

These are just four of the plugin options. There are many more that do the same or similar.

The four above were tested and they work very well.

The developers of the plugins continue to improve and update their products. So it is certain that they will continue working with newer WordPress versions.

Justify Text in WordPress Manually

This section discusses a different method for justifying text in WordPress. This procedure is a little harder.

It is suitable only for people with a higher WordPress experience level. It requires at least an intermediate level.

This is how it works:

  • Log in to the WordPress website.
  • Go to the WordPress dashboard.
  • Hover over Appearance.
  • Click Customize. In the following window, the themes appear with their Additional CSS option at the end.

  • Click the Additional CSS option.
  • Add the following string of code
justify-text {

text-align: justify;

}
  • Save and Publish. After saving and publishing the CSS is applied to the theme.
  • Go back to the WordPress dashboard.
  • Open the article or start a new one.
  • Select the piece of text that needs to justifying.

  • Go to the Advanced tab in the Block panel on the right.
  • Go to the Additional CSS Classes
  • Type ‘justify-text‘ in the empty text box to apply this attribute to the selected post text.
  • Click Update.

The selected text will now have the CSS Justify attributes.

In practice, it is not very difficult to do. But those with little experience in WordPress will find it difficult to follow the guide.

How to Justify Text in Gutenberg?

Gutenberg is a text editor. Many do not like using it but it is a very powerful piece of software that can do almost anything.

It only takes some time to get familiar with. It can take over many of the tasks that plugins do.

Justifying text in Gutenberg is also not hard to do:

  • Add a text block.
  • Go to the block settings.

  • Under the Advanced section add the following code to the CSS block.
p.justify {
    text-align: justify;
}
  • Save the post.
  • Check by viewing or previewing.

With this method, any new text created in WordPress is also automatically justified.

Ending thoughts on how to justify text in WordPress

Justifying text in WordPress is an important skill to have.

WordPress removed the button that does this from its editor. But a text field that is aligned on both sides looks better and leads to a better reading experience.

With the simple instructions above it is easy to justify text. So, why not try it?

Justifying text is indispensable for a book, essay, or another long piece of text. On a website, a justified text gives an overall professional impression.

If you enjoyed reading this article on how to justify text in WordPress, you should check out this one on how to delete WordPress themes.

We also wrote about a few related subjects like how to watermark imageshow to check the WordPress versioncreating a comparison table with WordPress pluginshow to upload an HTML file in WordPresswhere are WordPress pages stored and why is WordPress so hard to use.


Sanja Pajic
Sanja Pajic

Full Stack Web Developer

Articles: 40