I'm in the process of upgrading my website, and this involves the decision of using the new HTML5 semantic elements <nav> <header> <footer> <aside> <section>
over regular old <div>
elements.
I do plan on supporting IE7 and IE8, but I know that these versions don't support the above semantic elements. I've read up about 'plugins' like Modernizr, Initializr and HTML5shiv, and I know that older browsers will then support the new elements IF JavaScript is enabled, but what am I supposed to do if it's not?
By default, the <html>
tag is given the class of no-js
and if JavaScript is enabled, Modernizr/Initializr replaces this class with js
. That's all well and good, but there are some things I'm uncertain about. So far, what is covered?
Sorted
- IF JavaScript is enabled, IE7 and IE8 are supported by Modernizr/Initializr.
- With a
reset.css
file, other older browsers support these new tags. - Modern browsers are all fine.
Problems
- IF JavaScript is disabled, what am I supposed to do about IE8 and below? The
no-js
class is added to the<html>
tag, so what exactly can I do with that? - How can I use
<noscript>
to my advantage here? I don't want to make pages too large with coding.
So, aside from those questions, I also want to ask if it's really worth using these tags, when I can just use good ol' <div>
tags which would both support older browsers and also keep file sizes down by eliminating the required coding to make the new tags work in older browsers?
Thank you, Dylan.