How to Add Single / Double Line Spacing in WordPress

42

Do you want to add single / double line spacing in WordPress? In most Word processors, you can easily add extra blank line space by pressing the enter key a few times. You can also create double spaced line after paragraphs from the formatting options. However, WordPress visual editor doesn’t have those buttons. In this article, we will show you how to easily add single / double line spacing in WordPress.

Adding single or double line spacing in WordPress

Before we start, it’s important to know that line spacing is controlled by the WordPress theme you use. We will show you how to add line spacing in the visual editor, and then we will cover how to change the line spacing in your theme if you’re not happy with the results.

Video Tutorial

 

Subscribe to WPBeginner

If you don’t like the video or need more instructions, then continue reading.

Adding Double Line Space

When you press the ‘Enter’ key on your keyboard to add a line break, WordPress visual editor considers it as a new paragraph. This means that it will automatically add double line space granted that your theme has the styling for it (all good WordPress themes do).

So simply go in and press Enter after the line and then type something else in the next line.

Adding double line spacing in WordPress

By simply doing that, based on your theme styling, you should see a clear distinction between paragraphs (i.e double line spacing).

Double line space added to create paragraph in WordPress

Adding Single Line Space

Now if you are writing something like an address, then you probably want it to be single spaced instead of double spaced.

Single Space Preview

In this case, you need to press SHIFT + ENTER key.

This will tell WordPress that you want to start a new line inside an existing paragraph thus it needs single line spacing vs double line spacing.

Modifying the Line height and Spacing

Sometimes even when you add the proper line spacing in the editor, it doesn’t display the way you want it to in your theme. This is when you need to add some CSS to your theme.

CSS is basically like the formatting feature in Microsoft Word. Instead of clicking buttons, you will be writing some plain CSS code. It is not as scary as some beginners may think. CSS is very easy to understand if you are just following instructions.

To add custom CSS to your theme, you need to visit Appearance » Customize page. This will launch the WordPress theme customizer where you need to click on the ‘Additional CSS’ tab from the left column.

Adding your custom CSS

In the custom CSS box you need to add the following CSS code:

  .post p{line-height: 1.5em;}

Adding custom CSS to increase line height

The CSS rule shown above will change the line spacing of paragraph content to 1.5em. Em is a unit of width for typography. We are using .post class which WordPress automatically adds to the content area of all posts to make sure it only affects posts and not paragraphs used elsewhere.

Now this only changes the spacing of single spacing. If you want to change the spacing between each paragraph (i.e double spacing), then you would need to add padding.

  .post p {   line-height: 1.5em;  padding-bottom: 15px;  }

Feel free to adjust the numbers to meet your needs.

We hope this article helped you add single / double line spacing in WordPress. You may also want to see our tips on mastering the WordPress visual editor to write content more efficiently in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.