Ancient DTD Hacking

In 1999 I was inspired by the lack of the ability to validate code with things like the <nobr> tag, to write my own DTD – Document Type Definition. [see code] I think this article at Web Design Group was the thing that did it. If I remember correctly, their their validator actually listens to this “roll your own” technique. At the time there was no alternative to writing nonstandard html, and if you wanted to QA your code it was a hassle to see it complaining about things like marginwidth and marginheight in the <body> tag. The solution was to roll your own DTD and validate against that.

Modern browsers do their own thing when it comes to DOCTYPE declarations, so for public websites, using a custom doctype would probably be inviting trouble. But for QA, it could be useful. Here’s another article on this issue which may be worth your time.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.