HTML and CSS Reference
In-Depth Information
<p> Discussion of section element </p>
</section>
<section id="newFormElements">
<header>
<h2> New Form Elements </h2>
</header>
<h3> input type=date </h3>
<p> Discussion here... </p>
<footer>
<p> These ideas are from WebForms specification. </p>
</footer>
</section>
</section>
<section id="chapter3">
<header>
<h2> Chapter 3 </h2>
</header>
<p> Massive element reference... </p>
</section>
<footer>
<p> Content of this example is not under copyright </p>
</footer>
</body>
</html>
O NLINE http://htmlref.com/ch2/html5today.html
Figure 2-7 shows the rendering of the example in two common browsers. Note that
Internet Explorer 8 and earlier has some trouble with the new elements.
To address Internet Explorer's lack of support, we can introduce a small script that
creates the new HTML5 elements using the DOM createElement() method. Once IE
recognizes them as elements, it renders the markup and style fine, as shown in Figure 2-8.
<!--[if IE]>
<script type="text/javascript">
var html5elements = "abbr,article,aside,audio,canvas,datalist,details,
figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,
time,video".split(',');
for (var i = 0; i < html5elements.length; i++)
document.createElement(html5elements[i]);
</script>
<![endif]-->
O NLINE http://htmlref.com/ch2/html5todayie.html
 
Search WWH ::




Custom Search