Why can't the

tag contain a

tag inside it?

前端 未结 5 2052
小蘑菇
小蘑菇 2020-11-21 22:09

As far as I know, this is right:

some words

But this is wrong:

&l

5条回答
  •  情话喂你
    2020-11-21 22:57

    Because the div tag has higher precedence than the p tag. The p tag represents a paragraph tag whereas the div tag represents a document tag.

    You can write many paragraphs in a document tag, but you can't write a document in a paragraph. The same as a DOC file.

提交回复
热议问题