Reputation: 1
Can anyone kindly explain, whether in IE7 HTML5 tag elements works properly. I'm here to know just the HTML structure elements works fine or not?
Kindly help
Upvotes: 0
Views: 86
Reputation: 201618
Most HTML5 tags work in IE 7. Some of the tags added in HTML5 are not recognized by IE 7, which means that IE 7 processes and renders the content between the tags but ignores the tags (by default).
For new structure elements like nav
and header
, this means that IE 7 renders their content as is, without ensuring that they are rendered as blocks (which is the only real effect on rendering or functionality on supporting browsers). But you might not see the lack of support if the elements are used e.g. as in <div><nav>...</nav></div>', since
div` is rendered as a block.
The problem with IE 7 (and friends), as regards to the new structure elements, is that is does not recognize them as styleable elements. This is a special case of the phenomenon that it does not generally treat an unknown element as styleable. So if you set, say, nav { background: yellow }
in CSS, it will not have any effect.
Regarding workarounds to that problem, see How to use HTML5 in IE 7?, but the basic idea is simple: if you say e.g. document.createElement('nav')
in JavaScript (before any CSS code that tries to style nav
), IE 7 starts recognizing nav
as styleable. There are various libraries and other tools that include code for doing this for different elements.
The functionality of new HTML5 elements (say, the canvas
element or the <input type=date>
element) is a different matter. Some of the functionality can be achieved using various polyfills, but this really breaks down to many different questions (many of which can be found at SO with useful answers).
Upvotes: 1