Is it still necessary to put a space before closing an empty element in XHTML?

前端 未结 4 1915
南笙
南笙 2021-01-05 02:43

W3C recommends putting a space before the closing tag in XHTML, because this would give a better backwards compability with some browsers, e.g. write

4条回答
  •  萌比男神i
    2021-01-05 03:27

    I would say no... It was to support Netscape 4, as bobince said, and I believe the number of such browsers being really in use is very near zero, fortunately!
    Unlike what Vincent said, I don't think IE4 has such issue. And I believe we can class IE3/4/5/5.5 as dead anyway (at least gone of Web statistics), and waiting impatiently to do the same for IE6 too! :-D

    Silly thing, this has influenced so many people that sometime I see x="foo" /> even pure XML files!

提交回复
热议问题