According to the W3C HTML4 specs, p
elements cannot contain block level elements, not even another p
.
The P element represents a paragraph. It cannot contain block-level elements (including P itself).
This goes for any block level elements set to display as inline
, or inline-block
- which still remain block level elements in this context (within a p
).
Theres also an interesting comment as to why this may be in the W3C HTML5 specs
The solution is to realise that a paragraph, in HTML terms, is not a logical concept, but a structural one. In the fantastic example above*, there are actually five paragraphs as defined by this specification: one before the list, one for each bullet, and one after the list.
*This refers to an example of a p
tag containing a ul
with 5 li
items
Authors wishing to conveniently style such "logical" paragraphs consisting of multiple "structural" paragraphs can use the div element instead of the p element.