初学者常用的HTML结构与CSS公共样式模板
HTML模板:index.html
只添加了CSS文件链接与基本网页框架
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"/>
<meta content="telephone=0" name="format-detection"/>
<link rel="stylesheet" type="text/css" href="CSS/common.css"/>
<link rel="stylesheet" type="text/css" href="CSS/main.css"/>
<title>标题</title>
</head>
<body>
<!--头部-->
<header></header>
<!--主体-->
<section></section>
<!--尾部-->
<footer></footer>
</body>
</html>
CSS Common模板:Common.css
@charset "utf-8";
html,body,header,section,footer,ul,li,
a,p,span,img,h3{margin:0;padding:0;}
a{ text-decoration: none;}
img{border:0;}
ul{list-style:none;}
body{min-width:340px;
margin:0 auto;
font:normal 12px/1.5
Microsoft YaHei,
Helvetica,
Arial,
sans-serif;}