HTML 5: Is it
,
, or
?

后端 未结 29 3809
滥情空心
滥情空心 2020-11-22 00:26

I\'ve tried checking other answers, but I\'m still confused — especially after seeing W3schools HTML 5 reference.

I thought HTML 4.01 was supposed to \"allow\" singl

29条回答
  •  一个人的身影
    2020-11-22 00:31

    XML requires all tags to have a corresponding closing tag. So there is a special short-hand syntax for tags without inner contents.

    HTML5 is not XML, so it should not pose such a requirement. Neither is HTML 4.01.

    For instance, in HTML5 specs, all examples with br tag use
    syntax, not
    .

    UPD Actually,
    is permitted in HTML5. 9.1.2.1, 7.

提交回复
热议问题