W3C home > Mailing lists > Public > www-html@w3.org > November 2013

Re: ID/Class Names beginning with numbers

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Wed, 27 Nov 2013 21:19:06 +0200
Message-ID: <529645AA.6000105@cs.tut.fi>
To: "'www-html@w3.org'" <www-html@w3.org>
2013-11-27 20:58, Philip Taylor wrote:

> Jukka K. Korpela wrote:
>
>> People have just been misled into thinking that old DOCTYPE strings
>> specified the "HTML version being used".
>
> In what way have they been misled, Jukka ?

The way that they regard a syntax declaration as specifying a version in 
a manner that would matter anything outside formal validation.

>  When I insert (e.g.,)
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
>
> at the top of a web page expressed in HTML, I am making a definite
> statement that that is (a) the dialect I have elected to use, and
> (b) that is the DTD against which the document should be checked
> in the event that someone alleges it contains errors.

By the SGML standard, which is normatively the only thing that matters 
here, you are just specifying a DTD, a formal syntax specification. 
Validators will by default use it, but this can be overridden in their 
user interface.

Beyond that, it never had any impact, *except* that it triggers 
"standards mode" in browsers - something quite different from its SGML 
meaning.

Most importantly, browsers do not care the least about "HTML versions" 
(apart from text/html vs. XML media types, but this does not depend on 
the DOCTYPE string).

If someone alleges that your page contains errors, then a DOCTYPE is 
just a formality. For example, the following document passes validation, 
but it is neither conformant nor sensible:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
<title/I made this up/
<h6><img src=logo.gif alt="TURN IMAGES ON YOU FOOL"></h6>

(The page uses an SGML construct that is valid in HTML 4.01 but not 
supported by any browser. It also contains an alt attribute that is not 
an adequate replacement for an image, violating HTML specifications, but 
SGML validation cannot possibly detect this. And using a 6th level 
heading as the only heading is just mad, but conforming.)

Yucca
Received on Wednesday, 27 November 2013 19:19:33 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:26 UTC