In other words, the doctype alone is not going to make your pages HTML5-compliant. In fact, you can use one of those two older doctypes with new HTML5 elements on the page and the page will render the same as it would if you used the new doctype.Next up in any HTML document is the is the one that defines the character encoding for the document.A full explanation of character encoding is beyond the scope of this article, and it probably won’t be that interesting to you, either.
These mystery elements were seen by the rendering engine as “unknown elements,” so you were unable to change the way they looked or behaved.
This includes not only our imagined elements, but also any elements that had yet to be defined at the time those browser versions were developed.
This is because the majority of browsers don’t actually care what tags you use.
If you had an HTML document with a tag) in it, and your CSS attached some styles to that element, nearly every browser would proceed as if this were totally normal, applying your styling without complaint.
Of course, such a hypothetical document would fail to validate and may have accessibility problems, but it would render correctly in almost all browsers — the exception being old versions of Internet Explorer (IE).
Prior to version 9, IE prevented unrecognized elements from receiving styling.Although the current iteration of web markup is known as “HTML5,” it really is just an evolution of previous HTML standards — and future specifications will simply be a development of what we have today.Because browsers are usually required to support all existing content on the Web, there’s no reliance on the doctype to tell them which features should be supported in a given document.The doctype can be written in uppercase, lowercase, or mixed case.You’ll notice that the “5” is conspicuously missing from the declaration.For XHTML 1.0 Strict: Although that long string of text at the top of our documents hasn’t really hurt us (other than forcing our sites’ viewers to download a few extra bytes), HTML5 has done away with that indecipherable eyesore.