I'm a code newbie and I was just making a wordpress post and instead of using the correct line break code of <br /> I used </ br> in the VISUAL editor. When I switched to the HTML editor and back to the VISUAL editor, to my surprise the line break code was still there. But it had changed from </ br> to <!-- br-->

Should I just use that <!-- br--> code now instead of </ br> or </ br>? If it's okay, I would like to because I like switching between visual and html tabs. This allows me to do that with the line break code to disappear. So should i use that <!-- br-->? I don't want it to break my theme later on if i'm using the wrong code.

2 Answers 2


This <!-- br--> does not do anything, most probably WP nulled it because it was broken, so you should use <br /> , in HTML mode.

  • Oh i just looked at the page source it says, <p><!-- br--><br /> <!-- br--><br /> <!-- br--><br /> <!-- br--><br /> <!-- br--><br /> <!-- br--><br /> <!-- br--><br /> <!-- br--><br /> <!-- br--></p> <p>my text, text, text</p> do you think i could leave it like that?
    – user6133
    May 27, 2012 at 21:44
  • Use just <br> or <br />, <!-- br--> is an invalid markup, invalid = not good = useless ;) . From what I know WP can auto add <br> just by pressing the ENTER on your keyboard, and it is always hiding <br> and <br />.
    – Bogh
    May 28, 2012 at 5:50

</ br> is invalid markup. The editor can either remove it or hide it in a comment. It does the latter, so you can fix it by hand.

For line breaks use <br> or <br />, nothing else.

  • Ok so the <code></ br></code> is an invalid markup but it does produce a line break though. Can I use it? I just want to because the line break doesnt disapear when i switch between tabs
    – user6133
    May 27, 2012 at 21:38
  • Use it for what?
    – fuxia
    May 27, 2012 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.