If you’ve built a site using HTML5 or even have just looked into it, you’ll know that HTML5’s new tags are there to reduce the amount of mark-up that web designers need to build a web page. Things like <header> and <nav> are there to replace the <div> tags that are on almost every web page made ever. But I’ve noticed a trend that I think defeats the whole reason these tags are there.
Here’s a header the way it’s supposed to be done in HTML5:
1 2 3 4 5 6 7 8 |
Pretty simple stuff. It’s there to replace this:
1 2 3 4 5 6 7 8 |
But here’s the problem. Internet Explorer doesn’t recognize any of the HTML5 tags, so your options are to give the new tags ids, don’t use HTML5 or use something like HTML5 Shiv, which forces IE to recognize the tags using JavaScript. I say use option two or option 3. But I’ve been seeing something around the web that’s making me concerned. There are some people out there that use IE and have JavaScript turned off, so if they visit your site, it’s not going to display right. Now I don’t have the figures for how many people out there surf the web with that setup but I have to think it’s pretty low. But some people think you should be prepared for people like this and do this:
1 2 3 4 5 6 7 8 9 10 11 12 |
The HTML5 is for the browsers that support it and the divs are for IE. But this completely defeats the purpose of the new HTML5 tags and is extra code that you don’t need.
My opinion is this: If you’re going to start building sites using HTML5, then go 100% HTML5. If the small amount of people out there that use IE with JS disabled can’t see the site, that’s their problem. Don’t use anymore mark-up than you need to, if you’re concerned that the site won’t display right for a large amount of your site’s target audience, then stick with HTML 4.1 or XHTML.