"CJM" <cj*****@yahoo.co.uk> wrote:
Are DOCTYPE statements case sensitive?
Parts of them are...
The root element (i.e. the HTML) is case senstive in so far as the
root element itself might be case sensitive. i.e. in XHTML the root
element must be html because all element names in XHTML are lower
case; but in HTML it makes no difference.
The Formal Public Identifier (the part in quotes) is also case
sensitive.
If you include the URL then that's as case sensitive or insensitive as
any other URL.
As far as I'm aware the rest is not case sensitive.
I cant remember where, but I'm sure I read that case *does* matter...
eg.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd>
...will work [ie trigger 'Standards mode'], but...
<!doctype html public "-//w3c//dtd html 4.01//en"
"http://www.w3.org/tr/html4/strict.dtd>
..won't.
That second one is wrong as the FPI should be uppercase as in the
first example.
Doctype sniffing is another matter as their we're dealing with
browsers and their peculiarities rather than SGML/XML rules.
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>