Forum Moderators: open
Good question, hot topic! Lot's of opinions to be sure....
I am firmly rooted in the <!doctype> camp. While before "Standards" doctype was not "crucial," and some would argue that it is still not, the reasons FOR using a doctype are becoming more and more important.
I'm sure will here LOTS of viewpoints here... it's all good!
Also 'THE POWERS THAT BE' are trying to influence a change on the web toward well-formed webpages. If they get the browser developers to make browsers less and less 'forgiving' then it is in our best interests the learn xhtml, thus the DTD 'Transitional' for this learning period.
Also XMl is up and coming, XHTML follows XML rules for well-formedness. While XML doesn't require a DTD it does require well-formedness or it won't parse. Using a DTD in XHTML helps to validate your pages for well-formedness.
Having worked in multiple areas of IT I can say that changing gears like using XTHML with DTDs is in your best interest to stay on top.
You shouldn't need a validator to tell you about your code
That validator comes in quite handy. I suppose if you can just pick up a book and read it and then start cranking out perfect code then a validator would indeed be useless.
Most of the experienced coders I know use debugging programs, validators, syntax checkers, etc. Besides, that W3C validation button looks so cool...
DG
In another thread, someone mentioned that if you have your <? xml tag *before* the DOCTYPE, this triggers quirks mode on IE6. Anyone know more about this?
That was me I think! Your pages will still validate perfectly well with the doctype first then the xml declarations.
IE5 missinterprets some pretty key css concepts and 6 is much more compliant so theý had a little worry over how to satisfy people that had whole sites full of carfully balanced pages that took into account ie5's 'quirks' and decided that 'standards' mode would only be triggered if there was a doctype on the first line.
Nick
was a doctype on the first line
That's the part I didn't know. So will IE7 have "double quirks mode" which will trigger quirks in IE6 (because DOCTYPE is on the second line) and not in IE7 (because code is valid XHTML Strict....
You shouldn't need a validator to tell you about your code
You shluodn't nede a spellign dictionary to tell you how to spell byut someitmes when you go fast, you make mistake.
Tmo
You shluodn't nede a spellign dictionary to tell you how to spell byut someitmes when you go fast, you make mistake.
Great analogy! ;)
I no I knead a spell chequer awl the thyme!
Lot's of great reasons for using a <!doctype> listed here, including consistancy: I find using a <!doctype> is the first step towards this goal. Sure, there are other things to watch, but using a <!doctype> tells the browser "like it is." ;)