HTML 5: Is it
,
, or
?

后端 未结 29 3264
滥情空心
滥情空心 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:48

    Both
    and
    are acceptable in HTML5, but in the spirit of HTML,
    should be used. HTML5 allows closing slashes in order to be more compatible with documents that were previously HTML 4.01 and XHTML 1.0, allowing easier migration to HTML5. Of course,
    is also acceptable, but to be compatible with some older browsers, there should be a space before the closing slash (/).

提交回复
热议问题