HTML5新建网页标准文档

每次新建网页都要从头做起比较麻烦,特别要处理HTML5标签在IE下的兼容问题,还有CSS reset,此文档是小狼自用的标准文档。包括一个html文件,一个css文件,一个js文件。

HTML文件


<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>HTML5</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/html5.js"></script>
</head>
 
<body>
<!--header-->
<header>
</header>
 
<!--section-->
<section>
</section>
 
<!--aside-->
<aside>
</aside>
 
<!--footer-->
<footer>
</footer>
</body>
</html>
 

css文件


/* CSS reset*/
body, div, dl, dt, dd, ul, li, h1, h2, h3, h4, h5, h6,
pre, form, fieldset, input, textarea, p, th, td { padding: 0; margin: 0; }
header, nav, section, article, aside, footer{ display:block; } 
h1, h2, h3, h4, h5, h6 { font-weight: normal; font-size: 100%; }
table { border-collapse: collapse; border-spacing: 0; }
img { border: 0; }
ul { list-style: none; }
th { text-align: left; }
 
/* globel */
body{ font: 12px/2em "宋体"; color:#666;}
.w960{ width:960px; margin-left:auto; margin-right:auto;}
.red{ color:#C00;}
.fl{ float:left; display:inline;}
.fr{ float:right; display:inline;}
.cl{ clear:both;}
 
/* header */
 
/* section */
 
/* aside */
 
/* footer */
 

JS文件


(function(){ if(!/*@cc_on!@*/0)return; var e = "header,nav,section,aside,footer,article,audio,video,canvas,hgroup,menu,output,time".split(','),i=e.length; while(i--){document.createElement(e[i])} })()

 

点击下载压缩包: http://www.lingxiaolang.com/web/standard.rar