"CJM" <cjmwork@yahoo.co.uk> wrote:
[color=blue]
> Are DOCTYPE statements case sensitive?[/color]
The part that is in quotation marks is case sensitive. The rest isn't.
[color=blue]
> I cant remember where, but I'm sure I read that case *does* matter...[/color]
Well, I'm afraid the HTML specification doesn't tell you this, and various
tutorials are even less informative. In principle, you are supposed to know
this from SGML.
[color=blue]
> eg.
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd>[/color]
There's a missing quotation mark near the end. Otherwise, the incantation is
correct.
[color=blue]
> ...will work [ie trigger 'Standards mode'], but...[/color]
Umm... will be mishandled by browsers, which abuse it and make (wrong)
guesses on author's intentions, completely missing the point of document
type definitions.
If they take SGML seriously, they do that just by accident, so what is
_right_ by international standards is of little consequence here. But
apparently wowsers accidentally treat the quoted strings as case sensitive -
probably just because it's a little easier, or because nobody gave the issue
a thought.
[color=blue]
> <!doctype html public "-//w3c//dtd html 4.01//en"
> "http://www.w3.org/tr/html4/strict.dtd>
>
> ..won't.[/color]
It is malformed, since there is no catalogued DTD under the name
"-//w3c//dtd html 4.01//en".
--
Yucca,
http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring:
http://www.cs.tut.fi/~jkorpela/www.html