Mark Pilgrm wrote on this today in his usual engaging style: http://diveintohtml5.org/semantics.html
he points to Henri Sivionen's detailed summary of browser behaviour: http://hsivonen.iki.fi/doctype/ which delineates Quirks, Standards and 'Almost standards' mode - I think it is the latter that we want here, no? The key part: Here are simple guidelines for choosing a doctype for a new text/html > document: Standards mode, cutting edge validation <!DOCTYPE html> This is the right thing to do if you want to validate<http://html5.validator.nu/> new features such as <video>, <canvas> and ARIA. Note that the HTML5 validity definition is still in flux. Please be sure to test your image alignment in Firefox, Safari, Chrome or Opera 9 or 10. Testing image alignment with Internet Explorer is inadequate however be sure to test in IE8, too. Standards mode, more stable validation target <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" " http://www.w3.org/TR/html4/strict.dtd"> This doctype also triggers the standards mode, and the decade-old HTML 4.01 validity definition is stable. Please be sure to test your image alignment in Firefox, Safari, Chrome or Opera 9 or 10. Testing image alignment with Internet Explorer is inadequate however be sure to test in IE8, too. You’d like to use the Standards mode, but you still want to validate deprecated markup or you use sliced images in table layouts and don’t want to fix them <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/html4/loose.dtd"> This gives you the Almost Standards mode (and the full Standards mode in really old Mozilla releases). Please note that your layouts based on sliced images in tables are likely to break<http://www.mozilla.org/docs/web-developer/faq.html#gaps> if you later move to HTML5 (and, hence, the full Standards mode). You willfully want the Quirks mode No doctype. Please don’t do this. Willfully designing for the Quirks mode will come and haunt you, your coworkers or your successors in the future—when no one even cares about Windows IE 6 anymore (already no one cares about Netscape 4.x and IE 5). Designing for the Quirks mode is a bad idea. Trust me. If you still want to support Windows IE 6, it is better to apply specific hacks for it using conditional comments<http://www.quirksmode.org/css/condcom.html> than to regress other browsers into the Quirks mode. I am not recommending any of the XHTML doctypes, because serving XHTML as text/html is considered harmful <http://hixie.ch/advocacy/xhtml>. If you choose to use an XHTML doctype anyway, please note that the XML declaration makes IE 6 (but not IE 7!) trigger the Quirks mode. On Tue, Oct 27, 2009 at 10:21 PM, Louis Ryan <lr...@google.com> wrote: > No thats about the size of it. There are too many quirks dependent gadgets > already out there that even defaulting any doctype would break a large > number of gadgets. > > On Tue, Oct 27, 2009 at 6:51 PM, John Hjelmstad <fa...@google.com> wrote: > > > I seem to recall that the decision we made a while back was: > > * if no doctype specified, let default reign (quirks, equivalent to > writing > > a doctype-free webpage) > > * else include doctype > > > > Take that with a grain of salt; it's been a while. Perhaps it's worth > > plumbing the archives for the longer discussion. > > > > --j > > > > On Tue, Oct 27, 2009 at 6:35 PM, Chirag Shah <chiragsh...@gmail.com> > > wrote: > > > > > Hey, > > > > > > It looks like there's a discrepancy in which HTML doctype is used > > > between the Java and PHP gadget renderers. > > > > > > GadgetHtmlRenderer.php says that "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD > > > HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">" should be > > > used when "quirks = false or empty in the view." > > > > > > The Java Gadget renderer will not set a default doctype if it can't > > > find one. Shouldn't both systems explicitly set a doctype if it's not > > > provided? > > > > > >