Why the HTML paragraph

behaves so oddly on my chrome?

前端 未结 4 1965
粉色の甜心
粉色の甜心 2021-02-20 02:54

Get an empty HTML, type in this and see its source code on Google Chrome:

 
WHY?

If you did i

4条回答
  •  忘掉有多难
    2021-02-20 03:17

    The paragraph tag is meant to contain text, or more precisely, inline elements. Chrome interprets a div inside a p as an html malformation and attempts to correct it as well as it can.

提交回复
热议问题