HTML常见标签默认样式重置

重置代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
body,p,h1,h2,h3,h4,h5,h6,dl,dd{
margin:0;
font-size:12px;
/* font-family:XX; */
}
ol,ul{
list-style:none;
padding:0;
margin:0;
}
a{
text-decoration:none;
}
img{
border:none;
}
/* 默认样式重置 (css reset) */

完整演示代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<style>
body,p,h1,h2,h3,h4,h5,h6,dl,dd{margin:0; font-size:12px;/* font-family:XX; */}
ol,ul{list-style:none;padding:0;margin:0;}
a{text-decoration:none;}
img{border:none;}
/* 默认样式重置 (css reset) */

</style>
</head>
<body>

<a href="#">a标签(链接,下载,锚点)</a>
![1.png](http://upload-images.jianshu.io/upload_images/3464381-e142e804264d3886.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
<a href="#">
![1.png](http://upload-images.jianshu.io/upload_images/3464381-e142e804264d3886.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
</a>
<span>区分样式</span>
<strong>强调(粗体)</strong>
<em>强调(斜体)</em>

<p>段落</p>
<div>块</div>
<h1>标题1</h1>
<h6>标题6</h6>
<ol>
<li>列表项</li>
<li>列表项</li>
<li>列表项</li>
</ol>
<ul>
<li>列表项</li>
<li>列表项</li>
<li>列表项</li>
</ul>
<dl>
<dt>定义列表标题</dt>
<dd>定义列表项</dd>
<dd>定义列表项</dd>
<dd>定义列表项</dd>
</dl>

</body>
</html>