Nesting block level elements inside the

tag… right or wrong?

前端 未结 6 2189
遇见更好的自我
遇见更好的自我 2020-11-22 10:13

Is it syntactically and semantically correct to nest

or any other block level element inside the

tag. I am talking about HTML

6条回答
  •  温柔的废话
    2020-11-22 10:50

    FWIW: I had a paragraph bracketed by paragraph tags. Inside that I put a div with display:inline on the div. But it still treated the div as a block element and closed the paragraph, creating a new line with a paragraph spacing.

    It appears that any block element inside paragraph tags forces the paragraph to close even if the block element is being displayed as inline in its CSS.

提交回复
热议问题