Friday, September 17, 2010

If At First You Don't Succeed, Make Sure You Added the DOCTYPE

I just thought of something that can be ridiculously aggravating.

Picture this: You're working along, making good progress structuring your HTML with beautiful DIV, UL, P elements, among other SEO-friendly markup. The CSS is nicely organized and as cross-browser safe as you can possibly make it. You're developing in Firefox or Chrome and everything looks fantastic, but you figure it's a good idea to check out IE since, while good developers know the tools on other browsers are vastly superior, this is largely still the public's browser of choice. And in order for any site to be successful you have to develop to the lowest common denominator, right? But wait, what's this!? IE just barfed all over your perfect markup, exclaiming "You don't know what you're doing, kid. Nice try!" Well, rather than throwing your computer out the window or starting from scratch, you might double-check that you didn't forget to include the DOCTYPE element at the top of your page. Forgetting to specify the document type can be the cause of some of the most annoying rendering bugs, so it pays to check.

Mike

No comments:

Post a Comment