3 ms·
I still don't understand why the doctype for html5 is: <!DOCTYPE html> and not <!DOCTYPE html5>
by RyanMcGreal 17y ago
I still don't understand why the doctype for html5 is:
<!DOCTYPE html>
and not
<!DOCTYPE html5>
- ZeroGravitas 17y agoThere's two questions here: 1. Does it work (i.e. trigger standards mode) in all browsers 2. Does it specifically identify content as HTML5 (as opposed to 6) i.e. versioning For 1, html5 puts versions of Firefox into quirks mode so it's no go. For 2, versioning HTML5, I'm going to take a handy shortcut and assume that if Microsoft supports something it's probably bad for the internet. There's a comment from Hixie here that touches on both issues: http://annevankesteren.nl/2005/07/html5-doctype#comment-4391 http://annevankesteren.nl/2005/07/html5-doctype#comment-4391
- MarkPilgrim 17y agoThe HTML5 doctype is the shortest doctype that triggers standards mode in all browsers.
- RyanMcGreal 17y agoIt sounds like HTML5 is a backwards-compatible superset that includes HTML4 and XHTML1. Does that mean the rendering engine browsers use for standards mode is effectively an HTML5 rendering engine that also works for valid HTML4 and valid XHTML1, since they're subsets of HTML5? Or am I way off-base?