Re: doctype ?

I've done some testing with IE6 and it shows that the browser ignores
the <!DOCTYPE> declaration. It doesn't matter what you write in the
PUBLIC field, the result is the same.

I'm not sure if this is 100% correct, but I believe that the
"-//W3C//DTD HTML 4.01 Transitional//EN"
part of the declaration should be enough for a standards conforming
application to validate your document.

If your application (e.g. browser) doesn't know the doctype, it should
validate your document based on the DTD:
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"

With the doctype declaration:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

You document is saying to the browser: "This document is an XHTML 1.1
document, as specified by W3C. If you know this document type, go ahead.
If not, then you can read the DTD at the specified location."

In theory, your browser should either have the DTD internally, or it should
read the DTD from the specified location.

In practice, it looks like the browsers just doesn't care about DTD's. But,
to insure compatibility with future browsers, you should always include the
DOCTYPE declaration.

> In theory, I suppose the browser should chuck pages out which don't
> validate against the DTD you have set but in practice this would be
> impracticle (90% of the web pages on the net wouldn't work :-)

That is a lousy excuse. If the browsers DID check documents for validity,
100% of the pages on the net would be conforming to standards, or they
wouldn't work.

Best regards,
Lars Ingerman Haenschke


----- Original Message ----- 
From: "Nigel Peck" <Nigel.Peck@itm-solutions.co.uk>
To: <Bob_Cieszkowski@Vanguard.com>; <www-html@w3.org>
Sent: Thursday, July 04, 2002 3:14 PM
Subject: Re: doctype ?


> 
> This is not a definative answer, but I assume that the DTDs are embedded
> in the browser software and there is never any need to refer to the DTD.
> DTDs must be embedded in the browser by the fact that they are able to
> understand (X)HTML.
> 
> In theory, I suppose the browser should chuck pages out which don't
> validate against the DTD you have set but in practice this would be
> impracticle (90% of the web pages on the net wouldn't work :-)
> 
> IMHO
> Nigel
> 
> >>> <Bob_Cieszkowski@Vanguard.com> 07/01/02 08:10pm >>>
> 
> 
> 
> 
> Hi. I have a question about using the DOCTYPE. I'm currently using the
> following:
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>         "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
> 
> Does the browser refer to
> http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd to see if the
> page is
> well formed everytime a page is loaded.
> Or is it useful only when we validate html.
> 
> Thanks!
> 
> 
> 
> ITM Business Solutions
> Unit 4
> Nine Trees Trading Estate
> Morthen Road
> Rotherham
> S66 9JG
> 
> Reception
> Tel: 01709 703288
> Fax: 01709 701549
> 
> Help Desk
> Tel:01709 530424
> Fax: 01709 702159
> 
> CONFIDENTIALITY NOTICE: This message is intended only for the use of
> the individual or entity to which it is addressed, and may contain
> information that is privileged, confidential and exempt from disclosure
> under applicable law.
> 
> 

Received on Thursday, 4 July 2002 12:38:00 UTC