WordPress strips / removes blank lines while I add empty lines


Line spacing in paragraphs plays in important usability role. Just like with happy couples, closeness shows that content is related. When paragraphs and headings are equidistant it is harder for the reader to know what is related to what.


The WordPress editor will strip out br and p tags that it decides are redundant.

WordPress will strip out multiple returns (enter).
WordPress will strip out br tags
WordPress will strip out p tags

Removing paragraph tags and break tags is not what most bloggers expect to happen. In fact, the removal of paragraph and break tags is a common source of frustration for WordPress bloggers. We want the paragraph formatting to be right. Hitting enter and enter and enter has no effect.


WordPress offers equal spacing between paragraphs

paragraph
paragraph
empty blank line / space
heading
empty blank line / space
paragraph
paragraph


To improve usability give readers spaces

paragraph
paragraph
empty blank line / space
empty blank line / space
heading
empty blank line / space
paragraph
paragraph


Here is how to add empty blank lines or spaces between paragraphs

    Select HTML mode

    Type in < p >< code >< br/ >< /code >< /p > without the spaces

    Copy and paste on each line that you want to add a blank empty line or blank space between paragraphs or headings or ordered lists or whatever.


Veiw the source code below to see an example

paragraph
paragraph
space
heading



paragraph
paragraph

I hope that if you find this helpful or you have another suggestion that you will leave a comment below.

26 Responses to “WordPress strips / removes blank lines while I add empty lines”

  1. Mark Says:

    Thanks. Found your website after googling “wordpress blank space”.

    My solution to this initially was to have a line with a white coloured “.” character, so that it wasn’t visible (not so easy on your site).

    Your solution is of course much more elegant.

    It seems bizarre to me that Wordpress would seem so keen that you author and publish content through their admin interface, and yet make it difficult for you to format it as you wish.

    Still it’s a cracking (and free) package so i’ll forgive them :)

  2. Jim Spencer Says:

    It is a crackin’ good platform and like all of us has it’s flaws. Thanks for dropping by and leaving a comment.

  3. vinay Says:

    Hello.

    Where exactly do I have to paste the code?

    And what is the code itself? Is it ?

    I am sorry that I am ignorant about codes and this is really spoiling my WordPress experience.

  4. Caryn Says:

    Thanks so much for this. Losing blank lines between paragraphs has been driving me crazy. Looking forward to trying out this solution.

  5. Mac Says:

    Thank you. After pulling my hair out of my head trying to figure this out I came across YOUR solution. Thank again. It worked!!!

  6. Danielle Says:

    It doesn’t work!!!
    I followed exactly what you have written but still no spacing in between the paragraph.
    check out my site
    http://www.kinderlandmsia.com.my/kinderland-centres/

  7. robin Says:

    THANK YOU! I’ve been dinking around w/this forever. I do what I think should work based on html code, but no! Thanks for cracking my little personal davinci code. :o )

  8. Jim Spencer Says:

    Danielle, Are you working in the Visual or HTML editor tab? Try using the HTML tab, if you are not already.

  9. JJ Sereday Says:

    Oh man I have been messing with this for over an hour and getting soooo frustrated. Thanks for the intelligent work around.

  10. Jim Spencer Says:

    JJ, thanks for stopping by and leaving some kind words. Glad that we could ease the tension in your day. ;-)

  11. Steve Pessah Says:

    why does the code get messed up once you change things that are in the html tab? the blank lines are fine, then if i want to do something else in the html tab the spacing gets all messed up again.

    any idea how to fix?

  12. Jim Spencer Says:

    The WordPress editor has a code cleanup capability that loves to remove blank lines.

  13. Steve Pessah Says:

    so you’re saying there’s no way to fix that? just gotta keep going back and editing?

  14. Jim Spencer Says:

    The best way to approach this is through setting up your CSS so that the desired spacing is in place before and after headings, sub-headings, blockquotes and so on. You can also turn off the WYSIWYG editor.

  15. mike Says:

    And you can also enter for a little less space.

    Thanks!

  16. mike Says:

    is the code for a little less space. Sorry – did not put in enough blank spaces!

  17. mike Says:

    Whoops again! Just leave out the “br” tag in the middle!

  18. Vishal Kambli Says:

    OK. heres another solution to add blank lines, but this is not a clean method:
    add a – or . and change its color equal to the background color.

  19. Mufi Says:

    Works on my blog,. Anyhow, how to set only half space of line? thanks for sharing

  20. Kym Browning Says:

    Thanks, this is an issue that just developed on several of our blogs
    I have tried various things and this is the first useful article that doesn’t involve a lot of changes to the base site or professional html knowledge to use it.
    thanks again

  21. Jim Spencer Says:

    Mike – thanks for your comments

    Vishal – that certainly works if you change the font color to match the background color, but not ideal.

    Mufi – you can set half a line in your CSS

    Kym – if you turn off the wysiwyg editor completely you can avoid this as well, I believe.

  22. Kym Browning Says:

    I don’t use the editor at all, my partner, who does most of the posts does.
    I am planning in installing the FCKeditor in all future wordpress blogs from now on, if I put them in now it will remove all the formatting on all the pages.
    If i turn off the wysiwyg editor will it remove the formatting already on pages throughout the site?

  23. Sandra Hendricks Says:

    This is helpful. I have been using   but it only allows one space. Can you tall me how to add extra space between my reader comments? When a comment is short it shoves the next gravatar over – see here: http://gg.thisshouldhelp.net/?p=1580

  24. 0bject Says:

    This was very helpful to me, thx.

    I’ve also ha luck with this simpler version. Maybe it will help others:

    (space)

    Not sure if this will display right, here:

    Simply insert code tag in angles, then a blank space, then a /closing code tag.

    Good luck & thx again!

  25. Oti Says:

    I too was plagued by this problem, and was pulling out my hair until I stumbled on your soution. Thanks a million…

  26. Tanush Says:

    Thanks a lot. Proved of great help.

Leave a Reply

Home | Resources | About JBS Partners | Contact us