I've been through a few issues, and I could still see in this answer that the <p>
tag does not accept any element as a child.
It seems that there are exceptions to some tags, that is, they can be added within a <p>
, such as <br>
, <a>
.
But I'm always in doubt when I want to use this <p>
tag on what I can or can not put inside it.
So, I wanted to know:
- What is the sense of having this restriction of the
<p>
tag not accepting certain elements? - What are the allowed elements within a
<p>
tag?
Note : The linked question answers that the <p>
tag does not accept certain elements, but does not explain why or why some are accepted.