• With this HTML IN THE DATABASE:

    <div class="b">
    <p>Go
    <a class="c" href="#">
    Here
    </a>
    </p>
    <img src="foo.jpg" alt="Bar" />
    </div>

    The following is outputted:

    <div class="b">
    <p>Go
    <a class="c" href="#">
    Here
    </a>
    </p>
    <p> <img src="foo.jpg" alt="Bar" />
    </div>

    The correct code is in the database so the tag is being added on output (I have ‘correct XHTML’ unchecked). I use CSS to display:block the IMG, so I don’t want to wrap it in p tags.

  • The topic ‘Erroneous P tags being added before IMG tags’ is closed to new replies.