Discussion on default margin and padding values ​​of common elements

Discussion on default margin and padding values ​​of common elements

Today we discussed the issue of what the margin value of default elements is in different browsers.


Copy code
The code is as follows:

// body margin value
Firefox 20.0 ----------------------- The margin of body is: margin:8px 8px 8px 8px;
Internet Explorer 6.0 ----------- The body margin is: margin:15px 10px 15px 10px;
Internet Explorer 7.0 ----------- The body margin is: margin:16px 11px 16px 11px;
Internet Explorer 8.0-10.0 ---- body margin is: margin:16px 8px 16px 8px;
Opera 12.11 --------------------- The body margin is: margin:16px 8px 16px 8px;
Safari 5.1 ------------------------- The body margin is: margin:16px 8px 16px 8px;
Google Chrome 27.0 --------- body's margin is: margin:16px 8px 16px 8px;

// margin value of h1
Firefox 20.0 ----------------------- The margin of h1 is: margin:21px 0 22px 0;
Internet Explorer 6.0 ----------- The margin of h1 is: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- The margin of h1 is: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- h1's margin is: margin:20px 0 20px 0;
Opera 12.11 --------------------- The margin of h1 is: margin:21px 0 21px 0;
Safari 5.1 ------------------------- The margin of h1 is: margin:21px 0 21px 0;
Google Chrome 27.0 --------- h1's margin is: margin:21px 0 22px 0;

// margin value of h2
Firefox 20.0 ----------------------- The margin of h2 is: margin:20px 0 20px 0;
Internet Explorer 6.0 ----------- The margin of h2 is: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- The margin of h2 is: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- h2's margin is: margin:20px 0 20px 0;
Opera 12.11 --------------------- The margin of h2 is: margin:19px 0 19px 0;
Safari 5.1 ------------------------- The margin of h2 is: margin:19px 0 19px 0;
Google Chrome 27.0 --------- h2's margin is: margin:20px 0 20px 0;

// margin value of h3
Firefox 20.0 ----------------------- The margin of h3 is: margin:19px 0 18px 0;
Internet Explorer 6.0 ----------- The margin of h3 is: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- The margin of h3 is: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- h3's margin is: margin:19px 0 18px 0;
Opera 12.11 --------------------- The margin of h3 is: margin:18px 0 18px 0;
Safari 5.1 ------------------------- The margin of h3 is: margin:18px 0 18px ;
Google Chrome 27.0 --------- h3's margin is: margin:19px 0 18px 0;

// margin value of h4
Firefox 20.0 ----------------------- The margin of h4 is: margin:22px 0 21px 0;
Internet Explorer 6.0 ----------- The margin of h4 is: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- The margin of h4 is: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- h4's margin is: margin:22px 0 21px 0;
Opera 12.11 --------------------- The margin of h4 is: margin:16px 0 16px 0;
Safari 5.1 ------------------------- The margin of h4 is: margin:21px 0 21px 0;
Google Chrome 27.0 --------- h4's margin is: margin:22px 0 21px 0;

// margin value of h5
Firefox 20.0 ----------------------- The margin of h5 is: margin:22px 0 22px 0;
Internet Explorer 6.0 ----------- The margin of h5 is: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- The margin of h5 is: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- h5 margin is: margin:22px 0 22px 0;
Opera 12.11 --------------------- The margin of h5 is: margin:22px 0 22px 0;
Safari 5.1 ------------------------- The margin of h5 is: margin:22px 0 22px 0;
Google Chrome 27.0 --------- h5's margin is: margin:22px 0 22px 0;

// margin value of h6
Firefox 20.0 ----------------------- The margin of h6 is: margin:25px 0 25px 0;
Internet Explorer 6.0 ----------- The margin of h6 is: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- The margin of h6 is: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- h6 margin is: margin:25px 0 25px 0;
Opera 12.11 --------------------- The margin of h6 is: margin:24px 0 24px 0;
Safari 5.1 ------------------------- The margin of h6 is: margin:24px 0 24px 0;
Google Chrome 27.0 --------- The margin of h6 is: margin:28px 0 28px 0;

// dl's margin value
Firefox 20.0 ----------------------- The margin of dl is: margin:16px 0 16px 0;
Internet Explorer 6.0 ----------- dl's margin is: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- dl's margin is: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- dl's margin is: margin:16px 0 16px 0;
Opera 12.11 --------------------- dl's margin is: margin:16px 0 16px 0;
Safari 5.1 ------------------------- dl's margin is: margin:16px 0 16px 0;
Google Chrome 27.0 --------- dl's margin is: margin:16px 0 16px 0;

// margin value of dd
firefox 20.0 ----------------------- The margin of dd is: margin:0 0 0 40px;
Internet Explorer 6.0 ----------- dd's margin is: margin:0 0 0 40px;
Internet Explorer 7.0 ----------- dd's margin is: margin:0 0 0 40px;
Internet Explorer 8.0-10.0 ---- dd's margin is: margin:0 0 0 40px;
Opera 12.11 --------------------- dd's margin is: margin:0 0 0 40px;
Safari 5.1 ------------------------- dd's margin is: margin:0 0 0 40px;
Google Chrome 27.0 --------- dd's margin is: margin:0 0 0 40px;

// ul's margin value
firefox 20.0 ----------------------- The margin of ul is: margin:16px 0 16px 0;
Internet Explorer 6.0 ----------- ul's margin is: margin:19px 0 19px 40px;
Internet Explorer 7.0 ----------- ul's margin is: margin:19px 0 19px 40px;
Internet Explorer 8.0-10.0 ---- ul's margin is: margin:16px 0 16px 0;
Opera 12.11 --------------------- ul's margin is: margin:16px 0 16px 0;
Safari 5.1 ------------------------- ul's margin is: margin:16px 0 16px 0;
Google Chrome 27.0 --------- ul's margin is: margin:16px 0 16px 0;

//margin value of ol
Firefox 20.0 ----------------------- The margin of ol is: margin:16px 0 16px 0;
Internet Explorer 6.0 ----------- ol's margin is: margin:19px 0 19px 40px;
Internet Explorer 7.0 ----------- ol's margin is: margin:19px 0 19px 40px;
Internet Explorer 8.0-10.0 ---- ol's margin is: margin:16px 0 16px 0;
Opera 12.11 --------------------- ol's margin is: margin:16px 0 16px 0;
Safari 5.1 ------------------------- ol's margin is: margin:16px 0 16px 0;
Google Chrome 27.0 --------- ol's margin is: margin:16px 0 16px 0;

// ul's padding value
firefox 20.0 ----------------------- The padding of ul is: padding:0 0 0 40px;
Internet Explorer 6.0 ----------- ul's padding is: padding:0 0 0 0;
Internet Explorer 7.0 ----------- ul's padding is: padding:0 0 0 0;
Internet Explorer 8.0-10.0 ---- ul's padding is: padding:0 0 0 40px;
Opera 12.11 --------------------- The padding of ul is: padding:0 0 0 40px;
Safari 5.1 ------------------------- The padding of ul is: padding:0 0 0 40px;
Google Chrome 27.0 --------- ul's padding is: padding:0 0 0 40px;

// ol's padding value
Firefox 20.0 ----------------------- The padding of ol is: padding:0 0 0 40px;
Internet Explorer 6.0 ----------- ol's padding is: padding:0 0 0 0;
Internet Explorer 7.0 ----------- ol's padding is: padding:0 0 0 0;
Internet Explorer 8.0-10.0 ---- ol's padding is: padding:0 0 0 40px;
Opera 12.11 --------------------- ol's padding is: padding:0 0 0 40px;
Safari 5.1 ------------------------- ol's padding is: padding:0 0 0 40px;
Google Chrome 27.0 --------- ol's padding is: padding:0 0 0 40px;

// margin value of p
Firefox 20.0 ----------------------- The margin of p is: margin:16px 0 16px 0;
Internet Explorer 6.0 ----------- The margin of p is: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- The margin of p is: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- margin of p is: margin:16px 0 16px 0;
Opera 12.11 --------------------- The margin of p is: margin:16px 0 16px 0;
Safari 5.1 ------------------------- The margin of p is: margin:16px 0 16px 0;
Google Chrome 27.0 --------- margin of p is: margin:16px 0 16px 0;

//margin values ​​of thead, tbody, tfoot
firefox 20.0 ----------------------- thead,tbody,tfoot margins are: margin:2px 2px 2px 2px;
Internet Explorer 6.0 ----------- thead, tbody, tfoot margins are: margin: 2px 2px 2px 2px;
Internet Explorer 7.0 ----------- thead, tbody, tfoot margins are: margin: 2px 2px 2px 2px;
Internet Explorer 8.0-10.0 ---- thead, tbody, tfoot margins are: margin: 2px 2px 2px 2px;
Opera 12.11 --------------------- thead,tbody,tfoot margins are: margin:2px 2px 2px 2px;
Safari 5.1 ------------------------- The margins of thead, tbody, tfoot are: margin: 2px 2px 2px 2px;
Google Chrome 27.0 --------- thead, tbody, tfoot margins are: margin: 2px 2px 2px 2px;

// form's margin value
firefox 20.0 ----------------------- The form's margin is: margin:0 0 0 0;
Internet Explorer 6.0 ----------- The form's margin is: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- The form's margin is: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- form's margin is: margin:0 0 0 0;
Opera 12.11 --------------------- The form's margin is: margin:0 0 0 0;
Safari 5.1 ------------------------- The form's margin is: margin:0 0 0 0;
Google Chrome 27.0 --------- form's margin is: margin:0 0 0 0;

<<:  A brief introduction to the differences between HTML and XHTML, and HTML4 and HTML5 tags

>>:  Implementation steps for Docker deployment of SpringBoot applications

Recommend

The difference between KEY, PRIMARY KEY, UNIQUE KEY, and INDEX in MySQL

The problem raised in the title can be broken dow...

Detailed explanation of the role of key in React

Table of contents Question: When the button is cl...

Basic knowledge of HTML: a preliminary understanding of web pages

HTML is the abbreviation of Hypertext Markup Langu...

Basic security settings steps for centos7 server

Turn off ping scanning, although it doesn't h...

SQL insert into statement writing method explanation

Method 1: INSERT INTO t1(field1,field2) VALUE(v00...

Detailed explanation of the use of React list bar and shopping cart components

This article example shares the specific code of ...

WeChat Mini Program User Authorization Best Practices Guide

Preface When developing WeChat applets, you often...

CSS3 clear float method example

1. Purpose Through this article, everyone can und...

How to install Postgres 12 + pgadmin in local Docker (support Apple M1)

Table of contents introduce Support Intel CPU Sup...

The most common mistakes in HTML tag writing

We better start paying attention, because HTML Po...

mysql 5.7.19 latest binary installation

First download the zip archive version from the o...

OpenSSL implements two-way authentication tutorial (with server and client code)

1. Background 1.1 Problems A recent product testi...

How to configure CDN scheduling using Nginx_geo module

Introducing the Geo module of Nginx The geo direc...