Showing posts with label transitional. Show all posts
Showing posts with label transitional. Show all posts

Friday, 26 August 2011

HTML5: The importance of !DOCTYPE

   


As our beloved W3C site states:
"When authoring document is HTML or XHTML, it is important to Add a Doctype declaration."
And you perfectly know why... don't you?
Ok... for those of you that don't know why, here's the explanation:
"There is not just one type of HTML, there are actually many: HTML 4.01 Strict, HTML 4.01 Transitional, XHTML 1.0 Strict, and many more. [...] Why specify a doctype? Because it defines which version of (X)HTML your document is actually using, and this is a critical piece of information needed by some tools processing the document. [...] with most families of browsers, a doctype declaration will make a lot of guessing unnecessary, and will thus trigger a "standard" rendering mode."
As you can see it's definitely not trivial. But why am I talking about it? Well, it has to do with HTML5.