02-22-2005, 02:04 AM
Does each page need the same doctype?
02-22-2005, 03:00 AM
You find the answers all at
a more descriptive overview of doctypes:
Some doctypes send IE 6 into quirks mode, which means that it will apply the broken box model of IE5. If that happens, you need to apply the dreaded "box model hack" for IE5 in your CSS.
If you dont know what this all means, just google for "broken box model"
A DTD is also needed for validation, which gives you an easy way to write correct code: just use a validator. Most "strange design effects" and "browser differencies" are caused by faulty code, which can easily be avoided by validation.
A DTD can even make a difference between getting displayed or not: Some browsers on mobile devices simply dont display content which doesnt have a DTD or a wrong one. With my Nokia cell phone (for example) I can easily surf any (accessible) page, as long as its got a valid XHTML DTD.
A hint: If you go XHTML, do not use the XML prlogue. It is not required, but will send IE6 into quirks mode. (Did I already tell that I hate that crappy piece of software? Hopefully, IE 7 will be at least a bit more compliant.)