DOCTYPE *first*

2007-09-13 @ 23:31#

twice in the last week, i've been asked to help sort out web browser rendering incompatibilities. and my first question is *always* "what DOCTYPE are you using?"

and the reply is usually one of the following:

  1. i don't know
  2. does that really matter?
  3. what's a DOCTYPE?

no kidding!

so here's the deal. don't even *start* writing your HTML until you first decide on a DOCTYPE. and don't just accept the one supplied by the template that comes with your favorite HTML editor (if one is there at all). instead, make sure you understand what DOCTYPEs are and how that relates to "Quirks Mode."

the best source i've found to helping sort out the details is Henri Sivonen's Activating the Right Layout Mode Using the Doctype Declaration. while i disagree wth the suggestion to *not* use XHTML DOCTYPES, the comparision chart is excellent and the advices is well thought-out and clearly written.