Document Type Declarations

“Your Doctype tag points to a specific set of rules for what can and can’t be in your document”

Following on from the last back to basics - Semantic Schmantics - A Meaningful Document - another important thing to understand is the Document Type Declaration. The World Wide Web Consortium (W3C) site has a primer on Doctypes titled Don’t Forget to Add a Doctype, Karl Dawson has a good article on the subject All in the Head: Document Type Definitions and the A List Apart article by Jeffrey Zeldman called Fix Your Site with the Right Doctype is what I’d consider essential reading. This is probably lazy of me but you’ll get far broader information from these links that I’d write in two paragraphs anyway.

Unfortunately most sites don’t carry a Doctype tag at the top of their pages or have cut and pasted one from the wrong source so its invalid. Also people are just putting Doctypes on pages with no intention of meeting the criteria from the relevant Document Type Definition and worse still they may not see the point in meeting the criteria at all. Which is really frustrating from my point of view because it means some firms - real example - will lie to win a contract and promise a Strict Doctype only to fail by about 300 errors: obviously they know the average client will accept

See there you have a Strict Doctype and your new site is web standards compliant! Ignore the errors if you find them, we’re professionals.

I’d really like to show you that example but unfortunately I have informal links with the national company whose site was made to such a specification (for nearly AUD$30,000). I’ve provided them with the information of their issues, at least on their public site, and some simple cures for most ills. One year later the site remains the same and looks somewhat different across browsers because of minor padding and margin inconsistencies, the main site navigation only appears if you have JavaScript enabled, and the sites Information Architecture is entirely hodgepodge with links out to the parent company at random places in the navigation heirarchy of all pages! Brilliant stuff.

OK that’s getting off track I suppose. The important thing to know is that your Doctype tag points to a specific set of rules for what can and can’t be in your document to meet that specification. When I assess a site its the first thing I’ll notice is wrong - and many so called professionals out there making big money seem not to even know they exist! Professionals? Read Molly’s Web Standards and the New Professionalism for the heads up on what a professional web developer should be striving for nowdays!

Comments are closed.


Sitemap