HTML 5 versus XHTML 1.0 Transitional?

后端 未结 9 1712
Happy的楠姐
Happy的楠姐 2020-11-28 22:12

It seems that HTML 5 is going to be supported (partially) by Firefox 3.1 and other browsers. It is adding support for video and audio as tags, but these are new tags that XH

9条回答
  •  眼角桃花
    2020-11-28 22:31

    Keep in mind that doctypes only serve one purpose in browsers: switch between quirks, almost standards and standards mode. Therefore, using and will work with any doctype declaration. IMO, using an XHTML doctype is quite useless, as every page you send with text/html MIME type is parsed as (tag-soup) HTML anyways. I suggest using the HTML5 doctype (), as it is easier to remember and doesn't force you in XML syntax without a reason.

    Why didn't they just add these tags to XHTML?

    They actually did, there is an XML serialization of HTML 5 (XHTML5). To use this, you have to send your pages with an XML MIME type, such as application/xhtml+xml. This is not (yet) supported by IE, though.

提交回复
热议问题