David Christopher Weichert said:
Most modern browsers have two rendering modes.
Well, that's what they say, without actually describing the differences
or even the exact conditions of triggering them. In reality, they have
different modes, and the doctype sniffing foolishness is just one
feature, possibly with more than two alternatives.
The Quirks mode render
HTML like old browsers (i.e. Netscape 4, Internet Explorer 4/5).
No, it just means that newer browsers intentionally imitate _some_ of the
erroneous behavior of the older browsers.
In standard mode they render the page adhering to W3C recommendations.
That's what they might want us to believe, but in reality, "standard"
mode only means that the browser does not intentionally misbehave the way
that they do "Quirks" mode.
The use of standard mode ist triggered by the presence of a document
type declaration (i.e. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML
4.01//EN"
"
http://www.w3.org/TR/html4/DTD/strict.dtd">).
Most probably, but that's not the only case.
Well, _there_ you can find some detailed information on the conditions of
triggering the intentional errors (aka "Quirks mode").
But unfortunately there is no good compilation of _what_ the "Quirks
mode" _causes_ in each browser. It has even been said, almost
authoritatively, that the "Quirks mode" _should not_ be documented!
A rule of thumb: If you get an old document, do _not_ change its DOCTYPE
declaration to one that may trigger "standard mode". When you write new
documents, use valid markup according to specifications unless you really
know what you're doing, and use a magic incantation that triggers
"standard mode".
As an example, if a document has used the nonstandard
<table height="..."> construct, the layout will fall apart in most
browsing situations if you add a standard DOCTYPE _or_ a DOCTYPE
declaration that refers to a customized DTD.
(Don't try to make sense of it. There's no rational reason why a browser
should stop interpreting nonstandard markup that it knows well, just
because a document incorrectly claims conformance to HTML 4.01 syntax,
i.e. claims that the nonstandard attribute isn't there, _or_ refers to a
DTD that describes the syntax used.)