Manually Insert a Line Break in WordPress


Sometimes WordPress acts like an evil devil, a digital psychotic dictator that decides it doesn’t want you to have spaces where you want to have spaces. It simply strips out the code no matter how many times you reset it or how many times you save it.

Mr. WordPress: “Oh, you want to start a new paragraph here? Sorry. I don’t want that.”

You: “But I do.”

Mr. WordPress: “Sorry. I don’t. I win.”

If you’ve never experienced this, trust me, you will.

To give an example, say you want your post to look like this:

 

Instead, it comes out looking like this:

 

The Solution

There is an easily solution to this that SHOULD work for you (at least most of the time). Simply switch to the HTML mode in your editor and manually add a line break with the following HTML code:

<br />

(“br” stands for “break” – easy enough to remember)

*** Sometimes you may even need to add two line breaks, depending on how well your WordPress editor is obeying you.

<br />
<br />

Another Example

It’s important to note that you will get a new line break where you put the line break code, even if it seems to be in the middle of sentence.

 

 

Photo: Devil from BigStock

Comments (14)

  1. Hi Joe,

    Thanks for sharing this tip.

    About two years ago, I started using the html editor a lot more, mainly for the reason you mentioned. Occasionally, I’d find that this would happen with the type of font I used also. I wasn’t sure if it were WordPress doing that, or the offline blog editor I use — MarsEdit. However to avoid further code stripping, I’ve swapped to using the html editor for the majority of my blog posts.

  2. No, please don’t use br tags! they should be removed from all HTML. HTML is a semantic language, it exists to describe information not generate positioning, styling or layout information – that is what CSS is for.

    Instead of br, unless it is a poem or something where the break is actually part of the content then you should use headers, or sub headers, strong or em tags and generate the style or size of gap using stylesheets.

    /pendantic rant

    • I’m with Timothy, you can never fully segregate content and style, and there are very obvious examples of where a br tag is essential in the *content*. In these situations, the semantically appropriate thing to do is to use a break tag. Period.

      shift+enter ftw!

  3. And sometimes the breaks can have too much space on certain themes or within the sidebar text fields so you might have to go into the stylesheet css inside your theme editor and change the value for line-height em.

  4. Everywhere on the internet all one has to do is hit the enter button for line break, except for WordPress. Why?

    I am not a code writer. I want to write words not code. I want to write ideas not build a website.

    I want a line break where I want a line break when I want a line bread without having to write code.

    It looks like people have had this same problem for years. Why?

    Can we fix this?

  5. I know this was written at the end of 2011 but I just had this frustration now, yes it’s still not fixed and inserting gets immediately stripped out and replaced with a non breaking space  

    The good news is that the non breaking space works for the purpose.

Participate