Manually Insert a Line Break in WordPress

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.

14 Responses

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.

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.

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.

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.