HTML 5: Is it
,
, or
?

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

    Ummm.....does anyone know a SINGLE vendor, user-agent, or browser maker that has ever followed the W3C Specifications 100%??? So if HTML5 says it supports all three break element versions, you can bet the vendors support the same and even more sloppier versions!

    The ONLY thing that matters in this debate is to CONSISTENTLY use coding that also happens to follow XML specifications as well as HTML specifications when possible. That means you should use the correct XML version of the break tag and encourage all your team to do the same:


    The same space-slash format should apply for the img, a, hr, and meta tags in your code. Why? Because:

    1. Its is backwards compatible with older XHTML user-agents / browsers
    2. The browser vendors support the XML version anyway so the HTML5 specification is moot.
    3. The sloppy implementations of most user-agents today, in the past, and in the future will accept it.
    4. It allows your markup to be comparable with XML standards should you need to go back to creating XHTML/XML documents from your markup.
    5. It's "good coding practice" for ALL WEB DEVELOPERS to keep using solid markup practices that follow XML, including coding in all lower case, quoted attributes, escaped XML characters, etc. etc. Why? In the future if you have to switch to XML data you automatically code and think in XML.
    6. We can only hope that in the future World Wide Web, we move away from private vendor-implemented standards and go back to solid, reliable, verified markup that parses faster, moves data over the wires faster, and make our future Internet a more standardized medium using XML.

    Besides, in the robotic and machine world that's here, where robots don't have the same Human-interface coding problems HTML5 solves for us, they will gladly go back to XML data systems and parse such UI web pages much faster when converted to XML data.

提交回复
热议问题