Test Results for 7 Common DOCTYPEs Note that the first three DOCTYPEs do not return a Content-type header. This is because PHP/Apache will return text/html by default so there is no need to do so. Also, if you are using an older browser or one that doesn't support application/xhtml+xml you will not see that header either. This is referred to as Content Negotiation. In the case of IE, you will not see the XML declaration before the DOCTYPE because that will send it into "quirks" mode which we don't want. W3C claims there is a workaround for IE and the declaration but at the time of this writing I did not have the time to implement or test it. The declaration isn't mandatory anyway, I'm including it for completeness. 1. doctype('html', 'frameset'); returns: 2. doctype('html', 'transitional'); returns: 3. doctype('html', 'strict'); returns: 4. doctype('xhtml', 'frameset', '1.0'); returns: Content-type: application/xhtml+xml; charset=UTF-8 5. doctype('xhtml', 'transitional', '1.0'); returns: Content-type: application/xhtml+xml; charset=UTF-8 6. doctype('xhtml', 'strict', '1.0'); returns: Content-type: application/xhtml+xml; charset=UTF-8 Note: please see the documentation regarding a bug fix dated Feb-12-2005 What this boils down to is if the browser (typically IE/Win) does not accept application/xhtml+xml then we shouldn't send it XHTML 1.1, 1.0 Strict is fine however I've personally never seen a problem with this, but then I'm not sending anything outside the XHTML namespace (yet) so... 7. doctype(); [default parameters] returns: Content-type: application/xhtml+xml; charset=UTF-8