Re: Document Types (spinoff from stylesheets threads)
by Andrew McFarland <aamcf(at)aamcf.co.uk>
|
Date: |
Mon, 11 Mar 2002 17:16:32 +0000 |
To: |
hwg-techniques(at)hwg.org |
In-Reply-To: |
hotmail |
|
todo: View
Thread,
Original
|
|
At 12:53 11/03/02 +0000, Peter-Paul Koch wrote:
[I wrote]
>>In some browsers (IE5 /Mac, recent Mozillas, IE 6 /PC) the presence or
>>absence of a DOCTYPE (or XML declaration) can alter the way the page is
>>rendered. It follows that if you want your pages to appear consistently
>>across all browsers they should either all have the same DOCTYPE or none
>>of the should have one.
>
>This is theory. I do not believe for a single instant that two different
>browsers show a page exactly the same when you use the same doctype.
I meant that for a set of pages to appear consistent in a single browser
you should make sure they all have the same DOCTYPE. In some browsers a set
may appear consistently regardless of DOCTYPE, in others it won't.
>That is the reason I advise everyone *not* to use doctypes. We can't be
>sure of the consequences.
A page with a DOCTYPE that declares it to be XHTML 1.0 Strict and is XHTML
1.0 Strict will display much more consistently and predictably than a page
without a DOCTYPE at all. Changes in JavaScript behavior are also good. The
browsers switch from a non-standards based model to a standards based one.
This makes coding _much_ easier - no more document.all type sniffing.
Andrew
--
http://aamcf.co.uk/
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA