[thelist] Always use a DOCTYPE (was: Horizontal scrollbar in IE 6.0)

MRC webmaster at equilon-mrc.com
Tue Feb 26 15:13:56 CST 2002


> works perfectly in browsers from NN4 to Mozilla 0.9.8. Hacking a page
> together using tricks such as the omission of a DOCTYPE rule is a good
> way to build unstable pages cross-browser. I'm just trying to flag this
> up to list members who are seeing a hack that's suggested on-list, then
> using it with abandon and without sight of the consequences six months
> down the line.

    "Unstable" is not at all a word that comes to my mind in this
discussion, and I don't think it applies. "Hack" is just a bit further down
that same vocabulary list.
    Doctype-switching is a relatively new "invention" of browser makers (I
think IE 5/Mac was the first to use it) whereby document-rendering can be
performed in either a so-called "standards-compliance" mode or a so-called
"quirks" mode. The one and only purpose of doctype-switching is to
accommodate the requirement of many web developers that the browser render
pages in the same way that previous browser versions would have rendered
    It is almost inconceivable that any major web browser -- or any minor
one, for that reason -- will cease to render html pages altogether because
they fail to include a doctype declaration (which is, of course, invalid
html). Because of the vast quantity of non-compliant code available over
both public and private networks, any browser that did that would be DOA the
day of its unveiling.
    Also keep in mind that the "quirks" mode can be triggered in most
browsers _without_ writing non-compliant html.

James Aylard

More information about the thelist mailing list