please is there a way how to apply styles to html5 elements like header, section, aside etc. in older IEs, but without using javascript?
I know that there is the document.createElement(elem); solution, but is that possible even withou scripts?
please is there a way how to apply styles to html5 elements like header,
Share
This isn’t possible because the default behavior of older Internet Explorer versions is to ignore any not known element. This is why we use the JavaScript approach to “create” elements so that the browser recognizes them.
However, I don’t believe that relying on JavaScript is a bad thing, after all there is virtually no user currently with JavaScript off. And if it happens, your site will not be the only one with problems.
Also, you don’t need to write all those scripts by yourself. You can rely on something like the HTML5 Boilerplate that does it all for you (and some other things).
However, you can also use approaches to: redirect the user to another page depending on the version of the browser (with server coding), or that use conditional comments to write only known tags on IE.