HTML5 Doctype Support

For a long time I used XHTML1.1 because I thought I was cool (yes, yes). However, today I am reading an article by Ian Hickson about how everyone uses the wrong type of MIME with XHTML, and he has opened my eyes a lot. I happen to be one of those people who serve XHTML with text / html MIME because, like so many people, W3C says it's β€œnormal” to serve it that way.

At the top of this article, he says that β€œnow” he will serve it using an HTML document such as HTML5 (! DOCTYPE HTML). What do you think about this? If I hadn't used unsupported features, would it be nice? What will be the MIME type in this case?

Thanks for any help, Metropolis

+5
source share
2 answers

W3C does not say that it is normal to serve XHTML 1.1 as text / html. It says OK to serve XHTML 1.0 as text / html.

What HTML5 needs to understand is that it rotates the connection between the syntax and the mime type on the head. Instead of saying what mime types can be used with HTML and XHTML, HTML5 says that if you serve the page as text / html, then this is HTML, and if you serve it as application / xhtml + xml, then this is XHTML.

, doctype , HTML XHTML. , , , doctype . HTML5, validator.nu, mime . , - HTML, , , (, filename.html versus filename.xhtml)

, HTML5 , HTML5, , - HTML5. , , HTML4 HTML5 HTML5 . HTML5, , , , HTML4, HTML5.

, , application/xhtml + xml, HTML5 . .

+3

Google.com HTML5 <!doctype html> (. , ), , :)
, HTML 4.01 strict HTML5!

+2

All Articles