For web marketing training, presentations and workshops visit Pacifica Training. If you wish to ask questions about website marketing please head over and register free at the website marketing forum, a knowledge base and community driven discussion group.
Strict Doctype
Published: September 27, 2006
The elitists are doing the rounds again by advocating that the goal posts shift on what is required to produce a web site. The message this time is that everyone is persuaded to use the strict doctype and not the transitional.
If none of that makes any sense:
- Doctype
- Short for document type, it is the declaration in the code that indicates what the document type is, i.e. a HTML page.
- Transitional Doctype
- This is the declaration that allows for presentational attributes and elements in the HTML that are expected to be moved to a stylesheet.
- Strict Doctype
- The recommended doctype. This doctype requires presentational attributes and elements to be manipulated in a seperate stylesheet which cleans up the HTML.
My problem isn't the recommendation. Using a strict doctype is definitely the best one to use. I use it on this site. It means I have a leaner site with a higher content to markup ratio. My problem is the elitism. This message is only useful to a very small number of people, people that validate their websites.
Again, validation is highly recommended but in the real world there are too many tools available that publish content to the Web that fall way short of best practice. A lot of people, sorry, the majority of people rely on these tools so validation, doctypes and the like are out of their hands.
What's the answer?
According to some of the 'yes people' comments in Pickards post, you should only write to the Web if you have a license saying you're good enough. I've never heard so much rubbish in all my life.
The answer isn't to raise the top end and join the 'boys brigade' but to look at the tools you have and work with it. That means if you have a content management system and the validator has something to say about the code, get on the forums or use the support channels and tell them.
Validation is far more important than which doctype you use, because if the site isn't validated, the doctype is largely irrelevant.
Useful?
Assistance?
Comments
JackP says:
John Hansen says:
I wrote about the HTML vs. XHTML debate recently, and thought you'd be interested. My attitude toward "elitists" is kind of close to yours.
Joe Clark says:
Invalid code is no less bad on a Strict or Transitional site. It’s also no better.
Invalid code is fatal in the case where XHTML 1.1 is actually needed (in essence, only highly rarefied Japanese-language examples).
Eek!. I've just read the comment you're referring to! I wouldn't describe myself as elitist, if that's any help!
Indeed, I welcome the fact that everyone and their granny - and their granny's dog - can blog. My original article on accessites explains why we on accessites insist on a strict doctype for the sites we grade.
I'd certainly rather someone had a valid HTML 4.01 transitional doctype than didn't bother at all.
What inspired the post though was my exasperation at people continuing to use a transitional doctype even though there post would have validated as strict. It's as if people were scared of the strict doctype, when it's not actually that hard to achieve.
I also believe we should be encouraging WYSIWYG engines and blogging tools to produce more valid and more semantic markup to enable John 'hobbysite' Bloggs to produce better quality sites without needing to understand HTML.
I wholeheartedly support the notion that the web is for everyone, not just professionals - but that the professionals should be setting a good example!
PS apologies for the long comment