Forums

When does WP add <p> tag to posts? Is this a bug? (3 posts)

  1. brianlees
    Member
    Posted 7 years ago #

    I have a post with two paragraphs. When it is just text, I get two sets of paragraph tags. When I insert an image at the beginning of the post, I get two sets of P tags.

    However, when I insert a DIV at the beginning of the post, I don't get the first set of paragraph tags, even if the DIV is closed before the first letter of the post. (I am using DIVs to flat images left and right)

    What's up with that? Am I missing something?

  2. Kafkaesqui
    Moderator
    Posted 7 years ago #

    If you've placed the div and following text on the same line, then WordPress gets sort of stuck; placing a <div> in a <p> tag is invalid XHTML, and with no start of line designating what to wrap a <p> tag around, it leaves the text on that line alone.

  3. brianlees
    Member
    Posted 7 years ago #

    So I need to put a return in there? I'll have to test that.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.