The WordPress Text Editor: TinyMCE
In the administration area of WordPress, the text editor that you actually type into when writing posts is actually a javascript platform called TinyMCE. By most accounts it’s a pretty nice WYSIWYG editor that really gets the job done, but it’s not without some complaints.
A common complaint amongst WordPress bloggers is the inability to space out blocks of text. You can put as many returns between your paragraphs as you want, you aren’t going to get them, and TinyMCE is to blame. Every time you press return in a blog post, TinyMCE puts the text above it into paragraph (<p>) tags. Pressing returns multiple times should get you bunch of empty paragraph tags, which would result in several line breaks, but empty paragraph tags are intentionally removed by TinyMCE. Even if you manually add <br /> tags, they will be removed before the post is published.
You should be handling your spacing with CSS anyway
TinyMCE is actually just trying to be helpful and save you from yourself. Spacing out content is a design decision, not a content decision. And what is the guiding theory behind CSS? CSS separates content from design. If you want more spacing between your paragraphs, do it in your CSS.
Margin-bottom
This is all it takes:
p {
margin-bottom: 1.5em;
}Since each block of text in your post will be automatically wrapped in a paragraph tag, adding some margin-bottom will handle the spacing nicely. You could also use padding here, since paragraphs are block-level elements.
By the way, the same space-stripping applies to comments. Comments are treated in the same way as posts though, with paragraph tags around blocks of text, so the margin-bottom you apply for formatting your posts will work in your comments as well. Consider this a favor to your commentors. If they want to break up their comments into paragraphs, they should be able to do so and have it displayed properly.
Under the hood.
If you have a really good reason why you need to be able to add line breaks in your posts, you do have some options. This thread over at the WordPress forums details some edits to code that might be able to get the job done for you. All of the solutions boil down to the fact that hard returns in your posts are saved to the database as “/n” and they can be converted into break tags if need be.
If you absolutely must…
<p> </p>
Putting that inside your posts will force an extra line break if you absolutely need it. But don’t tell anybody I told you. ![]()
For a few more WordPress-specific CSS Tricks, check out my recent article on my favorites.






Thanks for writing this, I have been finding the line breaks thing really annoying.
I find that if I write it all in the visual editor and don’t switch over to code at all the line breaks will stay where I put them. But if I switch to code and then back to visual, game over. ;(
I’ll try that code you put here.
Cheers!
Snoskred
Wow, a very nice idea and a very impressive blog!
very useful, thank you.
Cool, glad you folks found it useful.
Oh thank you! This was a perfect fix for my wordpress line brake problem – I am glad I thought I was going to have to change themes.
A+++
Very good tip! Don't forget to do it from the HTML edit screen though.
Hi, you say you can edit the CSS file, presumably the 'style' file, but where exactly do we place that bit of code?
For every paragraph or is there some spot to place it once?
I'm finding my space between paragraphs is fine but the space between the text above and a sub-heading below is no different than a normal line-break. I need to make that space quite a bit bigger.
I've tried your " " thing and that deffo works – however then the space is perhaps too wide…
And as a professional copywriter I have to say, the spacing of text is NOT a design issue, it's a content issue! I get paid for my selling text, and spaces/pauses in text are vital for selling. However figured line spacing of text was a design element needs their toes stamped on…
Alan
My recent post Sales Copywriter Moves To Borneo- Writes for Peanuts!
I'm also a copywriter and the spacing thing is a concern when you are not css literate. What I see a lot is equal spacing throughout, between headings and body copy and then the same space between all paras, making it difficult to chunk paras properly. (also agree with Alan, spacing is key to copywriters!). I guess there's nothing else for it but for us to learn css and get on with it. I've been frustrated working with designers on a client's site who tell me there's nothing they can do to give me the spacing I want, but I understand now it is because they don't know how to do it! Thanks for your post. Very enlightening.