Dustin Diaz on DocTypes
Posted on | November 25, 2008 | 1 Comment
I just had to share this one with you as soon as I read it. Dustin Diaz shows us a way of declaring a doctype, that puts the browser is standards mode. Thought it won’t validate, which he explains:
There is really, absolutely no reason you need the rest of the doctype in your declaration unless you’re validating code. Furthermore, it does not mean that your page is even invalid. In the end, it puts your webpages into standards mode, which is what really matters.
The Code
It’s so simple! Just brilliant. Here it is:
1 | <!doctype html> |
You should just…
Try it out. It will fix your box model in IE6 and clobber all those other funny gotchas when you’re in quirks mode.
I’ll be sure to keep this one in mind. Thank you, Dustin.
Comments
One Response to “Dustin Diaz on DocTypes”
Leave a Reply
November 25th, 2008 @ 9:39 am
No Problem