[WEB4LIB] Document declarations

Thomas Dowling tdowling at ohiolink.edu
Sun Aug 27 15:19:54 EDT 2000


> As I caught up with Web4Lib mail today via the web, I conducted a
massively
> informal survey (hit ten websites mentioned in postings) and observed that
> none of them included HTML declaration statements... (to cite an example
of
> these: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> )
> Sunsite (the 11th site I hit) was the only website to *include* such a
> statement in its code.
>
> Do folks not care?  Is it because they aren't generated by editors such as
> FrontPage? Is the assumption that if the page displays under most
> conditions, it's not important?


Until recently, the presence of a DOCTYPE declaration or the DTD it
referenced was pretty much irrelevant.  Validators used it, but it didn't do
anything for the end user.

This is changing: both Mozilla and IE 5/Mac use the DOCTYPE declaration to
determine whether to use their strict rendering modes or their "tag soup"
bug compatibility modes.  That means that a page that really is HTML 4.01
Transitional will be rendered faster and more accurately in those browsers
if it includes the correct DOCTYPE.

The most likely fly in this ointment is browsers that automatically include
a DOCTYPE without doing anything to guarantee validity under that DTD, or
even assuring the user that it's a valid DOCTYPE.  If you're using a
commercial HTML editor, you should check to see what DOCTYPE it's declaring
if any.  BTW, DOCTYPE declarations are case sensitive.

(FYI: FrontPage 3.0 declares its output to be HTML 2.0; Netscape Composer
generates an unrecognized DTD identifier--because it's all lower-case.)


> When teaching basic HTML concepts, I've taken W3C's guidance quite
literally
> (with respect to version info, q.v.
> http://www.w3.org/TR/REC-html40/struct/global.html#h-7.2 )... should I be
> less vigilant in adherence to the standard?


I'd say it's time to be increasingly careful about this.

Thomas Dowling
Ohio Library and Information Network
tdowling at ohiolink.edu



More information about the Web4lib mailing list