Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 tags in IE 8 & IE 7

Hi as I mentioned in title, in Firefox (firebug), IE-9/10, Chrome it shows properly like:

<footer>
    <div>...</div>
</footer>

where as in IE-8/7 it shows like:

<footer />
    <div>...</div>
</footer/>

Any help is appreciated.

like image 363
UiUx Avatar asked Oct 30 '13 11:10

UiUx


People also ask

How to add HTML5 tags to ie7/8?

IE7/8 do not support the new HTML5 tags like footer. If you use them, you will get issues like this, and rendering glitches as a result. There are work-arounds in the form of the html5shiv and Modernizr polyfill scripts. Use one of these libraries to add support for HTML5 tags to old IE versions.

How do I style HTML5 elements in IE 8?

Include the script in your <head> tag, and you’ll be able to style the elements appropriately in IE: Note that I’ve used a conditional comment to only apply this to IE 8 and below. It’s my hope that IE 9 and onwards will support HTML 5 elements, but when that day comes, make sure to double check the conditional!

What is the difference between IE8 and HTML5?

These days, it means HTML, CSS, and JavaScript functionality. The term is becoming a bit "Web 2.0"-like. IE8's HTML5 support is limited, but Internet Explorer 9 has just been released and has strong support for the new emerging HTML5 technologies. HTML5 is still in draft spec (and will be for a loooong time).

How to render HTML5 in Internet Explorer 8?

If you want HTML 5 support in IE 8 then download the IE plugin called "Chrome Frame". It renders HTML 5 just like Google Chrome does! More info is here: appleinsider.com/articles/09/09/24/…


1 Answers

IE7/8 do not support the new HTML5 tags like footer.

If you use them, you will get issues like this, and rendering glitches as a result.

There are work-arounds in the form of the html5shiv and Modernizr polyfill scripts. Use one of these libraries to add support for HTML5 tags to old IE versions.

If you're not prepared to use a Javascript library to fix IE's HTML5 support, the other option is to stop using these tags and switch back to using <div> tags for everything, with classes to identify them semantically.

like image 64
Spudley Avatar answered Oct 05 '22 22:10

Spudley