Re: Document Types (spinoff from stylesheets threads)

by Andrew McFarland <aamcf(at)aamcf.co.uk>

 Date:  Mon, 11 Mar 2002 08:28:52 +0000
 To:  HWG Techniques Email List <hwg-techniques(at)hwg.org>
 In-Reply-To: 
  todo: View Thread, Original
At 20:35 10/03/02 -0500, Nathan wrote:
>What are your opinions of including or not including
>doctype declarations at the top of documents?
<snip/>

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.

Particularly if you are using XHTML you should only include a DOCTYPE if 
the document validates to the DOCTYPE. A validating parser will stop if 
there is a DOCTYPE and the document does not conform to it. A 
non-validating document will only stop if the document is not well formed.

Andrew

--
http://aamcf.co.uk/

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA