HTML 5: Is it
,
, or
?

后端 未结 29 3336
滥情空心
滥情空心 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条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 00:29

    I would recommend using
    for the following reasons:

    1) Text and XML editors that highlight XML syntax in different colours will highlight properly with
    but this is not always the case if you use

    2)
    is backwards-compatible with XHTML and well-formed HTML (ie: XHTML) is often easier to validate for errors and debug

    3) Some old parsers and some coding specs require the space before the closing slash (ie:
    instead of
    ) such as the WordPress Plugin Coding spec: http://make.wordpress.org/core/handbook/coding-standards/html/

    I my experience, I have never come across a case where using
    is problematic, however, there are many cases where
    or especially
    might be problematic in older browsers and tools.

提交回复
热议问题