WordPress.org

Ready to get started?Download WordPress

Forums

adding HTML in post / page adds spaces (2 posts)

  1. thomasjojo
    Member
    Posted 3 years ago #

    when I add a chunk of clean html in my page/post, there is added spaces and spaces. why?

    I paste the code into the visual HTML code editor, I also noticed it added some p´s too. why?

    I remove all the spaces, but it still do...

    this is my example:
    http://www.vmobile.no/roamingpriser

    select EU or Abkhazia and u see.

    If I add this in Joomla code edit, its fine, or the plain HTML page.

    How can I avoid such massive added space ???

  2. Curtiss Grymala
    Member
    Posted 3 years ago #

    In an effort to be more user-friendly, the WordPress backend automatically converts two line breaks into a <p>, one line-break into a <br/> and additional spaces between words into &nbsp;

    Within the editor (even the HTML code interface), it will then remove all <p>, <br/> and &nbsp; entities into line breaks or extra spaces when viewed. Therefore, if you have extra line breaks or spaces in your code, they'll be converted into paragraphs, line breaks and non-breaking spaces when rendered on your page.

Topic Closed

This topic has been closed to new replies.

About this Topic