<!doctype html> css
<html> html
<head> java
<meta charset="utf-8"> web
<title></title> canvas
<!--[if IE]> ide
<script type="text/javascript"> 網站
(function(){if(!/*@cc_on!@*/0)return;var 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=e.length;while(i--){document.createElement(e[i])}})(); spa
</script> code
<![endif]-->
</head>
<style type="text/css">
header,nav,aside,article,footer{ display:block;}
</style>
<body>
<header>
<p class="f_r"><a>手機訪問</a>|<a>網站地圖</a>|<a>來院路線</a>|<a>收藏本站</a></p>
</header>
<nav>
<ul>
<li>導航一</li>
<li>導航二</li>
<li>導航三</li>
</ul>
</nav>
<article>內容</article>
<aside>
柵欄
</aside>
<footer>
<p>備案信息</p>
</footer>
</body>
</html>
<!doctype html> <html> <head> <meta charset="utf-8"> <title></title> <!--[if IE]> <script type="text/javascript"> (function(){if(!/*@cc_on!@*/0)return;var 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=e.length;while(i--){document.createElement(e[i])}})(); </script> <![endif]--> </head> <style type="text/css"> header,nav,aside,article,footer{ display:block;} </style> <body> <header> <p class="f_r"><a>手機訪問</a>|<a>網站地圖</a>|<a>來院路線</a>|<a>收藏本站</a></p> </header> <nav> <ul> <li>導航一</li> <li>導航二</li> <li>導航三</li> </ul> </nav> <article>內容</article> <aside> 柵欄 </aside> <footer> <p>備案信息</p> </footer> </body> </html>
其中的代碼以下,經過JS建立HTML5標籤下載地址
<!--[if IE]>
<script type="text/javascript">
(function(){if(!/*@cc_on!@*/0)return;var 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=e.length;while(i--){document.createElement(e[i])}})();
</script>
<![endif]-->
<!--[if IE]> <script type="text/javascript"> (function(){if(!/*@cc_on!@*/0)return;var 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=e.length;while(i--){document.createElement(e[i])}})(); </script> <![endif]-->
其中的代碼以下,這些標籤自己就是塊級標籤,因此把這些標籤轉成塊級標籤
header,nav,aside,article,footer{ display:block;}
header,nav,aside,article,footer{ display:block;}
效果圖: