[thelist] DOCTYPE? What DOCTYPE?

Peter-Paul Koch gassinaumasis at hotmail.com
Tue Sep 11 05:46:13 CDT 2001

>Does everyone use the DOCTYPE declaration at the top of their HTML docs?

No. At the moment DOCTYPEs create more problems than they solve because each 
browser (NN6, IE6, IE5Mac) has its own problems with certain doctypes. I 
recently mailed about this in an IE6 thread.

>The reason I ask is that CSS seems to be rendered far more strictly if you 
>include the DOCTYPE. Trying to get relative font sizes to work in table 
>based layouts is almost impossible since if you use percentage based sizes 
>with a DOCTYPE, they scale themselves down with each nested 'td'. If you 
>miss off the DOCTYPE they happily stay the same size.
>This is happening in Netscape 6, IE5 (Mac) and IE 6, and possibly others. 
>IE4 and 5 (PC) seem to ignore it either way.

Yep, IE5 on Windows ignores doctypes.

>So, I know it is Mr. W3C's recommendation to have DOCTYPEs, and I'm not one 
>to argue, but it seems that I have four choices if I want my font sizes how 
>I want them:
>1. Use pixel sizes (naughty - users can't increase or decrease their fonts) 
>(with most browsers)
>2. Leave off the DOCTYPE (naughty naughty - Mr. W3C will get me)
>3. 'Class' every td separately (way too complex)
>4. Don't use tables (not an option - need to support NN3)

Option 2 (though option 1 isn't bad either).

Remember that DOCTYPEs aren't necessary for correct HTML pages, they're just 
necessary for valid HTML4.0/XHTML1.0 pages. If you forego the validity you 
can get away with leaving out the doctype.


Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp

More information about the thelist mailing list