I am updating my website, and this involves the decision to use the new HTML5 semantic elements <nav> <header> <footer> <aside> <section> for the usual old <div> elements.
I plan to support IE7 and IE8, but I know that these versions do not support the above semantic elements. I read about "plugins" like Modernizr, Initializr, and HTML5shiv, and I know that older browsers will support new IF elements. JavaScript is enabled, but what should I do if it is not
By default, the <html> assigned the no-js class, and if JavaScript is enabled, then Modernizr / Initializr replaces this class with js . This is all good and good, but there are some things that I'm not sure about. So far, what is covered?
Sorting
- If JavaScript is enabled, IE7 and IE8 are supported by Modernizr / Initializr.
- In the
reset.css file reset.css other older browsers support these new tags. - Modern browsers are fine.
Problems
- If JavaScript is disabled, what should I do with IE8 and below? The
no-js class is added to the <html> , so what can I do with this? - How can I use
<noscript> to my advantage here? I don't want pages to be too large with encoding.
So, besides these questions, I also want to ask whether it is really worth using these tags, when I can just use the good ol <div> tags that will support older browsers, as well as reduce file sizes, eliminating the need for coding for the new tags to work in older browsers?
Thanks, Dylan.
source share