DOCTYPE system id URI needed?

  • Thread starter =?ISO-8859-1?Q?=BBQ=AB?=
  • Start date
?

=?ISO-8859-1?Q?=BBQ=AB?=

W3C recommends a system identifier URI be used along with the public
identifier in the DTD. I had thought the URI was required, but
after using HTML Tidy to convert some pages to HTML 4.01, I noticed
the Tidy didn't put the URI in and that the W3C validator doesn't
mind its absence.

W3C says the URI "allows the user agent to download the DTD and
entity sets as needed." Is the URI actually necessary? Desirable?
Are there any agents which download it? [insert more vague questions
for discussion here]
 
M

Mark Parnell

Is the URI actually necessary?

For validation? No, as long as you are using a known doctype. If you are
using a custom DTD, you will need to provide a URI, otherwise the
validator doesn't know what to check the document against.

For browsers? Not necessary as such, but certainly it can be a good idea
in some cases, depending on the doctype used. A doctype declaration (for
some doctypes, e.g. HTML4.01 Transitional) without a URI can trigger
quirks mode in some browsers. More info:
http://gutfeldt.ch/matthias/articles/doctypeswitch.html
Desirable?

As above.
Are there any agents which download it?

Validators will if they don't recognise the doctype. AFAIK no other user
agent would bother.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top