Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Raf Pamintuan
Raf Pamintuan
830 Points

IE 8 problems

Although I know IE8is really outdated, but most companies here in the middle east doesnt bother to upgrade. They are still using old browsers.

I recently tried to use the following selectors:

header, nav, section, footer

none of them seem to work on IE8.

I just converted it into <div> in order to work.

I just want to ask if these selectors labels will be the standards in future on coding html.

I thinks backward compatibility to old browsers should be a top priority on designing websites as most clients complain if it doesnt work on their pcs.

4 Answers

Kevin Kenger
Kevin Kenger
32,834 Points

Hey Raf,

There actually is hope for using HTML5 tags in IE8! You can use what's called an IECC, or Internet Explorer Conditional Comment. An IECC is a bit of code that's only visible to versions of Internet Explorer earlier than 10. Well versions 6 through 9 anyway. All newer versions simply ignore it.

The code you'll want is a small Javascript program that will force the browser to recognize HTML5 tags and correctly apply the corresponding CSS.

This code goes between the <head> </head> tags at the top of your HTML file:

<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

Basically it says if Internet Explorer is earlier than version 9, run this Javascript code.

I have to issue a caveat here and say that this code only affects how the browser displays HTML5 tags. It doesn't actually make Internet Explorer "understand" an HTML5 tag. For instance the new <audio> and <video> tags won't be understood by the browser, and won't play HTML5 audio or video, even with the added Javascript code.

Anyway, I hope that helps!

Hey there, what you are stating is correct as you can see they won't work and will never work. Yes it is true this are valid HTML 5 tags and you would love it if they were backwards compatible but unfortunately IE8 is picky.

Check out these links :

http://caniuse.com/#search=header http://caniuse.com/#search=nav http://caniuse.com/#search=section http://caniuse.com/#search=footer

Also check out the note :)

Good luck !

Raf Pamintuan
Raf Pamintuan
830 Points

thanks buddy! i'll have a look.

Raf Pamintuan
Raf Pamintuan
830 Points

That's awesome Kevin! Let me try the code and see if it works on my project.

Thanks again!

Kevin Kenger
Kevin Kenger
32,834 Points

No problem! Let me know if it works!