Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 11
    Because <p> is a block level element, and is (supposed to be) used for displaying text, it won't allow other block level elements inside it, but only inline ones like <span> and <strong>.
    – Bojangles
    Commented Dec 6, 2011 at 9:46
  • 31
    JamWaffles: That p is a block level element has nothing to do with it. div is also one and allows other blocks.
    – Joey
    Commented Dec 6, 2011 at 10:03
  • 1
    possible duplicate of: stackoverflow.com/questions/4967976/… (unflagged): any decent answer to that will answer how to read the HTML spec and thus also answer this. Commented Jun 17, 2014 at 15:52
  • 2
    Declaring the div's style as inline doesn't work either.
    – Triynko
    Commented Dec 14, 2015 at 21:03