I've noticed that it's possible to download a copy of the standards available on w3c's website , save them to a folder on my own site, and link directly to them. Is this a desirable thing to do, or a stupid/buggy thing to do? I can see a few benifits: If there is a net disconnect, power outage, or intrusion, and the user can't get to w3.org, the user viewing my site can still use the doctype on my site. If w3 updates, I still know that my doctype and site match each other. I'm sure there are some downsides I'm missing, but the only one I can see is that there'd be more bandwidth coming out of my server.
The browser does not read the DTD. The html DTD is built into the browser, and that includes non extended xhtml served as text/html. What the browser does do is use the DTD as a trigger to determine whether to use quirks, near standard or standard mode to render the page. That is vendor specific. A complete and proper DTD, triggering standards mode, means that IE just might follow the rules well enough simulate being a good browser. Access to the DTD is necessary when using extended xhtml or xml other than xml 1.0 or one of the other standard xml DTDs. To see an example of an extended DTD, see this xhtml doc. Note that the browser reads the extension and renders as defined. A validator will not validate, as it doesn't read the extension. You will need to use a modern browser to view the xhtml page. IE is an obsolete PoS, and doesn't support xhtml. cheers, gary
So when using an xml or xhtml dtd, it is actually read. So where would it be better to have it be read from? Or am I missing the point to your post?
Your browser knows html, xhtml and the very limited xml1.0. It doesn't read it anywhere. The DTD, in x/html, serves no purpose other than to trigger standards mode. If you use the extensible abilities of xml or xhtml, you must tell it where to look for the definitions. In my example (did you look at the source?), the extensions are made part of the DTD declaration. Don't worry about that part. With IE's stupidity, there is little practical value to extending html; it's just an ego thing to show everyone how cool I am. cheers, gary
So in other words, it doesn't matter where I link it to, since it won't be read from that location. So putting it on my server only wastes my server space.
Use the DTD as is. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/html4/strict.dtd"> or <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> Code (markup): That's it. gary
*nods* Right, right. Although on some pages I'm afraid I'll be using transitional/loose for a bit yet.
Me too, currently I'm using: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> Code (markup): I've tried XHTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Code (markup): But the validator (http://validator.w3.org/) is too extrict for XHTML.