Re: missing DOCTYPE

At 02:23 AM 3/3/2000 , Anton Ertl wrote:
>The validator apparently tries to validate documents without DOCTYPE
>as HTML 4.0 transitional, and then complains about the missing
>DOCTYPE. [...]
>So wouldn't it be better to have the validator start trying to deal
>with a HTML-2.0 document, and only switch to something different upon
>a DOCTYPE declaration?

It depends on what you want the HTML validator to do.  "By the
book" you may be right, but in practice, most people today really
do want to code to HTML 4.01 Transitional and not HTML 2.0, if they
don't know enough to put in a DOCTYPE.  (If they do know enough,
then it doesn't really matter what the error says.)

HTML 4.01 Trans has nearly all the features that [web designers who
aren't aware of DOCTYPES] will be using already on their web
pages; HTML 2.0 has nearly none of them.  If you assume it should
be valid HTML 2.0 and just warn about a missing DOCTYPE, it will
generate huge amounts of errors on things that really are valid
HTML now.  (The same will happen if you assume HTML 4.01 Strict,
by the way.)

The most sane thing to do, that won't lead to that class of users
immediately declaring the validator worthless or their code
hopeless, is to assume the most flexible and inclusive DOCTYPE,
which at this time is HTML 4.01 Trans, and encourage them to 
use that.

-- 
Kynn Bartlett  <kynn@idyllmtn.com>                   http://www.kynn.com/
Chief Technologist, Idyll Mountain Internet      http://www.idyllmtn.com/
Become AWARE of Web Accessibility!                  http://aware.hwg.org/
The Spring 2000 Virtual Dog Show is now open!     http://www.dogshow.com/

Received on Saturday, 4 March 2000 19:55:08 UTC