|
Posted by Steve Pugh on May 19, 2006, 5:22 am
Please log in for more thread options
AndyZa wrote:
> According to the w3c specs a web page is not valid if the DOCTYPE
> declaration is missing. So, if I add the following doctype to my pages
> they will be "compliant":
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://www.w3.org/TR/html4/strict.dtd">
>
> But is this relevant to INTRANET sites where users might not have
> INTERNET access?
A compliant HTML document is a compliant HTML document regardless of
where it is published.
> How does the page get validated against the
> http://www.w3.org/TR/html4/strict.dtd DTD if the users don't have
> internet access?
It doesn't. Unless you have a validator installed on the Intranet e.g.
if you are be validating your pages as part of the publication process.
> What happens if the browser is unable to connect to
> the www.w3.org site where the .dtd document is stored?
Why would the browser be trying to connect to a web site if there is no
Internet access? What are your users doing that will cause the browser
to try and fetch the DTD?
>Does the validation "fail"?
What validation? Browsers do not validate HTML documents.
> Should I copy the .dtd file onto my intranet server and change the
> doctype to something like:
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
> "http://myintranet/strict.dtd">
No, if you have a validator on your internal systems then it should
have commonly used PUBLIC DTDs such as HTML 4.01 stored in its local
catalogue.
> Or should I leave out the doctype declaration completely for intranet
> pages?
Do you want your pages to be compliant with the specs or not?
Perhaps more importantly do you want to trigger the Quirks or Standards
Compliant rendering mode? That's all that web browsers use the doctype
declaration for.
Steve
|