2 ms·
So sad to see you upvoted, it just shows how little people do know about how HTML, browsers and doctypes interact. Browsers don't look at doctype and then choo
by rimantas 16y ago
So sad to see you upvoted, it just shows how little people do know about how HTML, browsers and doctypes interact.
Browsers don't look at doctype and then choose what to support and what not: they will always try their best. See for yourself: http://kod.as/lab/html5/html32.html http://kod.as/lab/html5/html32.html —that's HTML5
code with <canvas> but with HTML3.2 doctype. Try it in modern browser, canvas still works.
Let me repeat: browsers will always try to render all they can on the page, no matter if that feature was or not in the version of HTML page claims to be. The only thing doctype
affects is rendering mode. Any unknown doctype will trigger browsers to render the page in standards compliant mode. This feature is the reason why HTML5 has a doctype declaration at all. If you use XHTML5 (i.e. use xml markup and server your document with MIME application/xml+xhtml) you can omit doctype, because MIME type then tells browser which rendering mode to use.
- ceejayoz 16y agostrong, b, i, and small tags had their semantic meanings changed in HTML5. Thus, a HTML5 doctype gives some information to browsers and search engines on how those tags should be interpreted.
- rimantas 16y agoSo, will you elaborate, how browsers will act differently upon encountering b, i and small?
- ceejayoz 16y agoScreen readers may treat small as optional text, as it's intended as the inline equivalent of the aside block-level tag. b and i are likely going to wind up having ramifications for how screen reading browsers apply emphasis, as they now have semantic instead of presentational meaning.