Topic: DOCTYPE

Hi,
I need some advise:
What is the differnce between these two tags?
1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
and
2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401- … /loose.dtd">

I had some problems in the forum were the CSS was not incorporated properly ( or not to the full extent ). For instance, the colored scroll bars would not appear as I thought they would etc. I didn't really pay attention to it until i noticed that one menu item did show the page differently (and that menu item alone): "Admin" (tag 1).

I searched for the reason and found that the "DOCTYPE"-tag differed. I replaced tag 2 with 1 and voila'..

But, I would appreciate an explenation on why tag 1 works and not tag 2.

Tank's in advance

/Conny

Last edited by ConnyT (2004-02-21 01:21:59)

Re: DOCTYPE

The second doctype puts the browsers into standards compliance mode. The first puts the browers into quirks (backwards compatability) mode. You should be using the second one.

Last edited by Paul (2004-02-21 03:18:13)