ArtLung
san diego california usa artlung.com is the personal website of joe crawford

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.


posted this 21 years ago.
What else did he post in January 2002?

(Sunday January 13th 2002 at 10:40pm)

Leave me a comment!

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