The Semantic tags and attributes of HTML5 make it easy for developers to easily achieve a clear web page layout. With the help of CSS 3 rendering, it is very easy to quickly build a rich and flexible web page.
<! -- [Lt IE 9]> <script type = "text/javascript"> e = "abbr, article, aside, audio, canvas, datalist, details, dialog, eventsource, figure, footer, header, hgroup, mark, menu, meter, nav, output, progress, section, time, video ". split (',' I = (I -- </script> <! [Endif] -->
Method 2:Use Google's html5shiv package (recommended)
<!--[ lt IE 9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
However, no matter which method is used, the CSS of the new tag must be initialized. because HTML5 is represented by inline elements by default, we need to use CSS to manually convert these elements into block elements for easy layout.
{:}
However, if ie6/7/8 disables the script, it will become a "whiteboard" webpage without style. How can we solve this problem?
We can refer to facebook's practice to guide users into the noscript-marked"/? _ Fb_noscript = 1"Page, use html4 tags to replace html5 tags, Which is lighter than writing a large number of hack to maintain compatibility.
<! -- [Lte IE 8]> <noscript> <style>. html5-wrappers {display: none! Important ;}</style> <div class = "ie-noscript-warning"> scripts are disabled in your browser, please <a href = ""> check here </a> to enable the script! Or <a href = "/? Noscript = 1 "<! [Endif] -->