{"id":965,"date":"2010-09-26T11:28:11","date_gmt":"2010-09-26T11:28:11","guid":{"rendered":"http:\/\/salientsoft.co.uk\/?p=965"},"modified":"2011-11-17T15:17:00","modified_gmt":"2011-11-17T15:17:00","slug":"choosing-a-doctype-for-maximum-browser-compatibility-and-standards-mode","status":"publish","type":"post","link":"https:\/\/salientsoft.co.uk\/?p=965","title":{"rendered":"Choosing a DOCTYPE for maximum browser compatibility and standards mode"},"content":{"rendered":"<p>This follows on from my <a href=\"http:\/\/salientsoft.co.uk\/?p=759\"><strong>previous post<\/strong><\/a> which highlighted an example of a valid DOCTYPE which still threw IE into Quirks mode.<\/p>\n<p>The DOCTYPE issue has been something of a minefield \u2013 there are a number of different declarations and they are relatively complex, some have browser compatibility issues, and then of course different ones are needed for XHTML\/facelets use.<\/p>\n<p>It seems the holy grail of simplifying all of this is just to stick to the remarkably simple and highly compatible HTML5 DOCTYPE:-<\/p>\n<p style=\"padding-left: 60px\">&lt;!DOCTYPE html&gt;<\/p>\n<ul>\n<li>This has the following highly desirable characteristics:-<\/li>\n<li>It triggers standards mode for all known modern browsers<\/li>\n<li>It is backwards compatible<\/li>\n<li>It works with HTML pages and facelets\/XHTML<\/li>\n<\/ul>\n<p>See these posts <strong><a href=\"http:\/\/stackoverflow.com\/questions\/2935759\/is-it-possible-to-use-jsffacelets-with-html-4-5\">here<\/a><\/strong>, <a href=\"http:\/\/ejohn.org\/blog\/html5-doctype\/\"><strong>here<\/strong><\/a> and <strong><a href=\"http:\/\/stackoverflow.com\/questions\/5629\/any-reason-not-to-start-using-the-html-5-doctype\">here<\/a><\/strong> for more discussion on this.<\/p>\n<p>It really does seem to solve all the DOCTYPE pain \u2013 I think I\u2019ve died and gone to heaven!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This follows on from my previous post which highlighted an example of a valid DOCTYPE which still threw IE into Quirks mode. The DOCTYPE issue has been something of a minefield \u2013 there are a number of different declarations and they are relatively complex, some have browser compatibility issues, and then of course different ones [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[82],"tags":[115,76,40,78,184,16,188,114],"_links":{"self":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/965"}],"collection":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=965"}],"version-history":[{"count":7,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/965\/revisions"}],"predecessor-version":[{"id":1613,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/965\/revisions\/1613"}],"wp:attachment":[{"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/salientsoft.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}