看看所有常用标签的默认margin、padding?Demo戳这里 - -
当你每次看到为那一长串标签设置margin: 0; padding: 0; 的时候,你是否想看看哪些标签,在哪些浏览器里有默认值?
FF 32.0:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
==== Margin ====
h1,21.4333px,0px,21.4333px,0px
h2,19.9167px,0px,19.9167px,0px
h3,18.7167px,0px,18.7167px,0px
h4,21.2833px,0px,21.2833px,0px
h5,22.1833px,0px,22.1833px,0px
h6,24.9667px,0px,24.9667px,0px
p,16px,0px,16px,0px
ul,16px,0px,16px,0px
ol,16px,0px,16px,0px
dl,16px,0px,16px,0px
dd,0px,0px,0px,40px
hr,8px,0px,8px,0px
pre,16px,0px,16px,0px
figure,16px,40px,16px,40px
fieldset,0px,2px,0px,2px
blockquote,16px,40px,16px,40px
textarea,1px,0px,1px,0px
textarea,1px,0px,1px,0px
==== Padding ====
ul,0px,0px,0px,40px
ol,0px,0px,0px,40px
th,1px,1px,1px,1px
td,1px,1px,1px,1px
td,1px,1px,1px,1px
fieldset,5.6px,10px,12px,10px
legend,0px,2px,0px,2px
input,2px,2px,2px,2px
select,1px,1px,1px,1px
option,0px,5px,0px,3px
option,0px,5px,0px,3px
textarea,2px,2px,2px,2px
button,0px,6px,0px,6px
select,1px,1px,1px,1px
option,0px,0px,0px,20px
option,0px,0px,0px,20px
textarea,2px,2px,2px,2px
Chrome 36.0:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
==== Margin ====
h1,21.440000534057617px,0px,21.440000534057617px,0px
h2,19.920000076293945px,0px,19.920000076293945px,0px
h3,18.719999313354492px,0px,18.719999313354492px,0px
h4,21.280000686645508px,0px,21.280000686645508px,0px
h5,22.17759895324707px,0px,22.17759895324707px,0px
h6,27.959999084472656px,0px,27.959999084472656px,0px
p,16px,0px,16px,0px
ul,16px,0px,16px,0px
ol,16px,0px,16px,0px
dl,16px,0px,16px,0px
dd,0px,0px,0px,40px
hr,8px,0px,8px,0px
pre,13px,0px,13px,0px
figure,16px,40px,16px,40px
fieldset,0px,2px,0px,2px
blockquote,16px,40px,16px,40px
input,2px,2px,2px,2px
keygen,2px,2px,2px,2px
textarea,2px,2px,2px,2px
button,2px,2px,2px,2px
select,2px,2px,2px,2px
textarea,2px,0px,2px,0px
==== Padding ====
ul,0px,0px,0px,40px
ol,0px,0px,0px,40px
th,1px,1px,1px,1px
td,1px,1px,1px,1px
td,1px,1px,1px,1px
fieldset,5.599999904632568px,12px,10px,12px
legend,0px,2px,0px,2px
input,1px,0px,1px,0px
textarea,2px,2px,2px,2px
button,1px,6px,1px,6px
textarea,2px,2px,2px,2px
IE 10:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
==== Margin ====
h1,21.44px,0px,21.44px,0px
h2,19.92px,0px,19.92px,0px
h3,18.73px,0px,18.73px,0px
h4,21.28px,0px,21.28px,0px
h5,22.15px,0px,22.15px,0px
h6,25px,0px,25px,0px
p,16px,0px,16px,0px
ul,16px,0px,16px,0px
ol,16px,0px,16px,0px
dl,16px,0px,16px,0px
dd,0px,0px,0px,40px
hr,8px,0px,8px,0px
pre,13.33px,0px,13.33px,0px
figure,16px,40px,16px,40px
fieldset,0px,2px,0px,2px
blockquote,16px,40px,16px,40px
==== Padding ====
ul,0px,0px,0px,40px
ol,0px,0px,0px,40px
th,1px,1px,1px,1px
td,1px,1px,1px,1px
td,1px,1px,1px,1px
fieldset,2px,2px,3px,2px
legend,0px,2px,0px,2px
input,2px,1px,2px,1px
textarea,2px,2px,2px,2px
button,3px,10px,3px,10px
textarea,2px,2px,2px,2px
IE 9:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
==== Margin ====
h1,21.44px,0px,21.44px,0px
h2,19.92px,0px,19.92px,0px
h3,18.73px,0px,18.73px,0px
h4,21.28px,0px,21.28px,0px
h5,22.15px,0px,22.15px,0px
h6,25px,0px,25px,0px
p,16px,0px,16px,0px
ul,16px,0px,16px,0px
ol,16px,0px,16px,0px
dl,16px,0px,16px,0px
dd,0px,0px,0px,40px
hr,8px,0px,8px,0px
pre,13.33px,0px,13.33px,0px
figure,16px,40px,16px,40px
fieldset,0px,2px,0px,2px
blockquote,16px,40px,16px,40px
==== Padding ====
ul,0px,0px,0px,40px
ol,0px,0px,0px,40px
th,1px,1px,1px,1px
td,1px,1px,1px,1px
td,1px,1px,1px,1px
fieldset,2px,2px,3px,2px
legend,0px,2px,0px,2px
input,2px,1px,2px,1px
textarea,2px,2px,2px,2px
button,3px,10px,3px,10px
textarea,2px,2px,2px,2px
IE 8:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
==== Margin ==== h3,1em,0em,1em,0em h4,1.33em,0em,1.33em,0em h5,1.67em,0em,1.67em,0em h6,2.33em,0em,2.33em,0em p,1em,0px,1em,0px ul,1em,0px,1em,0px ol,1em,0px,1em,0px dl,1em,0px,1em,0px dd,auto,auto,auto,40px hr,0.5em,auto,0.5em,auto pre,1em,0px,1em,0px fieldset,0px,2px,0px,2px blockquote,1em,40px,1em,40px ==== Padding ==== ul,0px,0px,0px,30pt ol,0px,0px,0px,30pt th,1px,1px,1px,1px td,1px,1px,1px,1px td,1px,1px,1px,1px fieldset,0px,2px,3px,2px legend,0px,2px,0px,2px input,2px,1px,2px,1px textarea,2px,2px,2px,2px button,3px,10px,3px,10px textarea,2px,2px,2px,2px
IE 7:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
==== Margin ==== ul,auto,auto,auto,30pt ol,auto,auto,auto,30pt dd,auto,auto,auto,30pt blockquote,auto,30pt,auto,30pt ==== Padding ==== caption,1px,300zzz,500zzz,300zzz th,1px,1px,1px,1px td,1px,1px,1px,1px td,1px,1px,1px,1px fieldset,0px,2px,3px,2px legend,0px,2px,0px,2px input,2px,1px,2px,1px textarea,2px,2px,2px,2px button,1px,0.5px,1px,0.5px textarea,2px,2px,2px,2px
IE 6:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
==== Margin ==== ul,auto,auto,auto,30pt ol,auto,auto,auto,30pt dd,auto,auto,auto,30pt blockquote,auto,30pt,auto,30pt ==== Padding ==== caption,1px,3px,5px,3px th,1px,1px,1px,1px td,1px,1px,1px,1px td,1px,1px,1px,1px fieldset,0px,2px,3px,2px legend,0px,2px,0px,2px input,1px,1px,1px,1px textarea,2px,2px,2px,2px textarea,2px,2px,2px,2px
搜狗:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
==== Margin ====
h1,21.440000534057617px,0px,21.440000534057617px,0px
h2,19.920000076293945px,0px,19.920000076293945px,0px
h3,18.719999313354492px,0px,18.719999313354492px,0px
h4,21.280000686645508px,0px,21.280000686645508px,0px
h5,22.17759895324707px,0px,22.17759895324707px,0px
h6,27.959999084472656px,0px,27.959999084472656px,0px
p,16px,0px,16px,0px
ul,16px,0px,16px,0px
ol,16px,0px,16px,0px
dl,16px,0px,16px,0px
dd,0px,0px,0px,40px
hr,8px,0px,8px,0px
pre,13px,0px,13px,0px
figure,16px,40px,16px,40px
fieldset,0px,2px,0px,2px
blockquote,16px,40px,16px,40px
input,2px,2px,2px,2px
keygen,2px,2px,2px,2px
textarea,2px,2px,2px,2px
button,2px,2px,2px,2px
select,2px,2px,2px,2px
textarea,2px,0px,2px,0px
==== Padding ====
ul,0px,0px,0px,40px
ol,0px,0px,0px,40px
th,1px,1px,1px,1px
td,1px,1px,1px,1px
td,1px,1px,1px,1px
fieldset,5.599999904632568px,12px,10px,12px
legend,0px,2px,0px,2px
input,1px,0px,1px,0px
textarea,2px,2px,2px,2px
button,1px,6px,1px,6px
textarea,2px,2px,2px,2px
360 安全:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
==== Margin ====
h1,21.440000534057617px,0px,21.440000534057617px,0px
h2,19.920000076293945px,0px,19.920000076293945px,0px
h3,18.719999313354492px,0px,18.719999313354492px,0px
h4,21.280000686645508px,0px,21.280000686645508px,0px
h5,22.17759895324707px,0px,22.17759895324707px,0px
h6,27.959999084472656px,0px,27.959999084472656px,0px
p,16px,0px,16px,0px
ul,16px,0px,16px,0px
ol,16px,0px,16px,0px
dl,16px,0px,16px,0px
dd,0px,0px,0px,40px
hr,8px,0px,8px,0px
pre,13px,0px,13px,0px
figure,16px,40px,16px,40px
fieldset,0px,2px,0px,2px
blockquote,16px,40px,16px,40px
input,2px,2px,2px,2px
keygen,2px,2px,2px,2px
textarea,2px,2px,2px,2px
button,2px,2px,2px,2px
select,2px,2px,2px,2px
textarea,2px,0px,2px,0px
==== Padding ====
ul,0px,0px,0px,40px
ol,0px,0px,0px,40px
th,1px,1px,1px,1px
td,1px,1px,1px,1px
td,1px,1px,1px,1px
fieldset,5.599999904632568px,12px,10px,12px
legend,0px,2px,0px,2px
input,1px,0px,1px,0px
textarea,2px,2px,2px,2px
button,1px,6px,1px,6px
textarea,2px,2px,2px,2px
Opera 24.0:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
==== Margin ====
h1,21.4400005340576px,0px,21.4400005340576px,0px
h2,19.9200000762939px,0px,19.9200000762939px,0px
h3,18.7199993133545px,0px,18.7199993133545px,0px
h4,21.2800006866455px,0px,21.2800006866455px,0px
h5,22.1775989532471px,0px,22.1775989532471px,0px
h6,27.9599990844727px,0px,27.9599990844727px,0px
p,16px,0px,16px,0px
ul,16px,0px,16px,0px
ol,16px,0px,16px,0px
dl,16px,0px,16px,0px
dd,0px,0px,0px,40px
hr,8px,0px,8px,0px
pre,13px,0px,13px,0px
figure,16px,40px,16px,40px
fieldset,0px,2px,0px,2px
blockquote,16px,40px,16px,40px
input,2px,2px,2px,2px
keygen,2px,2px,2px,2px
textarea,2px,2px,2px,2px
button,2px,2px,2px,2px
select,2px,2px,2px,2px
textarea,2px,0px,2px,0px
==== Padding ====
ul,0px,0px,0px,40px
ol,0px,0px,0px,40px
th,1px,1px,1px,1px
td,1px,1px,1px,1px
td,1px,1px,1px,1px
fieldset,5.59999990463257px,12px,10px,12px
legend,0px,2px,0px,2px
input,1px,0px,1px,0px
textarea,2px,2px,2px,2px
button,1px,6px,1px,6px
textarea,2px,2px,2px,2px
Safari 5.17:
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
==== Margin ====
h1,21px,0px,21px,0px
h2,19px,0px,19px,0px
h3,18px,0px,18px,0px
h4,21px,0px,21px,0px
h5,22px,0px,22px,0px
h6,24px,0px,24px,0px
p,16px,0px,16px,0px
ul,16px,0px,16px,0px
ol,16px,0px,16px,0px
dl,16px,0px,16px,0px
dd,0px,0px,0px,40px
hr,8px,0px,8px,0px
pre,13px,0px,13px,0px
figure,16px,40px,16px,40px
fieldset,0px,2px,0px,2px
blockquote,16px,40px,16px,40px
input,2px,2px,2px,2px
keygen,2px,2px,2px,2px
textarea,2px,2px,2px,2px
button,2px,2px,2px,2px
select,2px,2px,2px,2px
textarea,2px,0px,2px,0px
==== Padding ====
ul,0px,0px,0px,40px
ol,0px,0px,0px,40px
th,1px,1px,1px,1px
td,1px,1px,1px,1px
td,1px,1px,1px,1px
fieldset,5px,12px,10px,12px
legend,0px,2px,0px,2px
input,1px,0px,1px,0px
textarea,2px,2px,2px,2px
button,1px,6px,1px,6px
select,2px,21px,2px,4px
textarea,2px,2px,2px,2px