2012-11-30 4:48, Gus Richter wrote:
> I'm going to give it one last try to enlighten Thomas PointedEars Lahn
Such persistence would be worth a nobler and a more realistic cause.
> and at the same time eradicate any misconception he may have caused.
Well, that's more realistic. And there surely are misconceptions around,
and to be honest, not all of them have been caused by the troll.
> <!DOCTYPE html> is the one and only doctype for HTML5.
Not correct. It is the recommended one, but a "DOCTYPE legacy string"
are allowed as well:
http://www.w3.org/TR/html5/syntax.html#the-doctype
> It is shorter - simplified by not including the unnecessary fluff.
I would add the practical point that the longer alternatives are fairly
complicated and people often make mistakes with them. A typo of a single
character usually throws browsers to quirks mode.
> It enables you to validate new HTML5 features and achieve more precise
> validation of old features.
No, it rather makes the
http://validatot.w3.org and
http://validator.nu
checkers perform checks of completely different kind. Instead of
strictly defined and DTD-driven validation, they run checks against what
was their authors' best understanding (at some moment of time) of some
unspecified version of the W3C HTML5 draft or the highly mutable
document with the oxymoronic name "HTML Living Standard".
Of course, this means that they try to process the proposed novelties,
which may violate existing DTDs and therefore be flagged as errors in
validation proper (DTD-based validation). They may also detect some
constructs that are errors according to current HTML specifications such
as HTML 4.01 but cannot be described in a DTD, or just have not been
described in a DTD.
But on the other hand, they report many constructs as errors, even
though they are valid by current HTML specifications, such as <meta
name=foo value=bar> (literally) or <td align=right>. Many old features
are flagged just because they have not been included into (some version
of) HTML5 drafts. And this may cause so many errors that you will have
hard time in distinguishing real errors among them.
> Standards mode means that the document will conform to the specification
> (Standards) - HTML Living Standard =or= W3C's HTML5,
No, it is just a browser's mode of operation, based on the assumption
that the document conforms to the "standards". Or, rather, the browser
makes its best attempt at processing the document by the "standards",
except in cases where it willfully deviates from that.
> where the new elements in HTML5 are supported
Support to new elements and attributes does not depend on the DOCTYPE at
all. There have been statements of such dependency in one browser for
some feature in the past, and this may well have been true, but this was
fixed long ago. Anyone knowing about such evidence in currently used
versions should stand up now to reveal the secrets.
> Standards mode is the only one in HTML5.
There is an ongoing activity aimed at defining quirks mode:
http://quirks.spec.whatwg.org/
Far from abandoning quirks mode, it is being turned to a well-defined
mode of operation. Of course the result is not the same as quirk mode in
browsers, since quirks mode varies greatly across browsers. But WHATWG
people seem to believe in changing this, and this would effectively mean
standardizing quirks mode!
> This means that it is, as it
> was previously known, Strict mode.
There is no Strict mode. There are Strict DTDs, and HTML5 drafts mostly
reflect them, but not completely. Browsers modes are something
completely different.
> In pre-HTML5, there was Strict mode doctype which meant that the
> document will conform to the HTML4.1 specification for example.
HTML 4.01, you mean, or HTML 4.0; there is no HTML4.1.
The Strict doctype declaration simply refers to a specific DTD, and the
Transitional doctype declaration refers to another DTD. As far as
specifications are concerned, that's all. The difference between the two
doctypes consists of the differences between the DTDs. Doctype sniffing
is something different, and it is based on dirty games on doctype
declarations as strings, not as references to DTDs.
> In pre-HTML5, there also was Quirks mode doctype,
No, there is no such doctype.
> In pre-HTML5, there also was Almost Strict mode
There is still a mode called that way in browsers. It is not a matter of
HTML versions, and surely not defined in specifications.
> In pre-HTML5, Quirks mode also meant that different browsers implemented
> their Quirks differently.
They still do, even though HTML5 activities aim at defining quirks mode.
There is no definition for it now, just descriptions of browser behavior.
> In pre-HTML5, Transitional meant, depending on its flavour, either
> Quirks or Almost Strict - all Quirks or partial Quirks.
Using a Transitional DTD without a URL is not a flavour, it is a
violation of the specification.
> If you write according to HTML4.01 Strict, you can still use <!DOCTYPE
> html> right now as a replacement for the Strict doctype,
No, you cannot; using <!DOCTYPE html> does not conform to HTML 4.01. You
can use <!DOCTYPE html> if you like, independently of the kind of HTML
you are actually using, if you want browsers to operate in "standards mode".
> Since <!DOCTYPE html> is simply a shortened down version, with all the
> unnecessary fluff removed, from the Strict doctype,
No, it is a completely ad-hoc magic string, "DOCTYPE string" as they
adequately call it. It has completely lost the meaning of a document
type declaration and become just an incantation used to trigger
"standards mode".
--
Yucca,
http://www.cs.tut.fi/~jkorpela/