> What, exactly, does the Doctype *do*? I know it determines how the > browser > should treat the display of the page and stuff...but what would happen if > you used perfect CSS that's on par with today's standards, but served your > website as HTML 4.01 Transitional? How out of whack would it throw your > CSS? Are there things that HTML 4.01 doesn't even recognize, because it's > not that far ahead in the game? If so, what? Would upping it one notch > by > adding the URI (or changing to HTML 4.01 Strict) make it function > properly, > or would you need to change completely to XHTML 1.0 Transitional at the > very > least? >
HTML 4.01 and XHTML 1.0 are the same, as stated on the W3C site: "XHTML 1.0 is a reformulation of HTML 4.01 in XML". [1] The only difference is the requirement that XHTML be well-formed XML; there's no hypertext markup language "game" in which one is ahead of the other. If you are using some aspect of HTML only found in the Transitional DTD [2] then it is a Transitional document; if you only use elements and attributes specified in Strict [3], it is a Strict document. As others have pointed out, browsers use the doctype as a way of switching rendering mode, but this has nothing to do with the DTD conformance or otherwise of the document, and it is not the purpose of the doctype. The Document Type Declaration, to give it its full title, is defined at [4]. To summarise: the document type declaration must correctly identify the document type definition to which the document is conformant. Using it to try to force particular browser behaviour, without actually conforming to the stated doctype, is bad practise at best and could well lead to browser rendering issues at worst. This is the reason for the oft-heard cry (around here at least) "Make your code valid and see if it's still broken." Check out the article "Liberty! Equality! Validity!" [5] at the Mozilla site for a more in-depth examination of the issues. HTH, Nick. [1] <http://www.w3.org/MarkUp/#recommendations> [2] <http://www.w3.org/TR/html4/sgml/loosedtd.html> [3] <http://www.w3.org/TR/html4/sgml/dtd.html> [4] <http://www.w3.org/TR/2004/REC-xml-20040204/#dt-doctype> [5] <http://developer.mozilla.org/en/docs/Liberty%21_Equality%21_Validity%21> -- Nick Fitzsimons http://www.nickfitz.co.uk/ ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/