This is a test of default margins
This is a DIV
A: This is a paragraph
B: This is another paragraph. If the browser collapses margins properly, the gap between
paragraphs A and B should equal to whichever is the larger of the gap between A and the DIV above it,
or the gap between B and the DIV below it.
This is a DIV
This is another DIV
This is an H1 in the test of default margins
This is another DIV
This is an H2. The DIVs either side have no default margins, so this just shows heading margins
This is another DIV
What have we learned?
Browsers have slightly different defaults for heading sizing and margins. Here's a screenshot of this page as rendered by Chimera, IE/Mac, Safari, Opera 6, iCab and OmniWeb (66kb PNG). All browsers were set to have a default font size of 16pt. This is larger than the defaults for Safari, OmniWeb and iCab.
- All the browsers have the same approach to heading sizing, if you start from a default font size of 16px.
- Be aware that Safari and OmniWeb default to 14px Lucida Grande, and iCab to 12px text. Thus although headings might follow the same proportions as other browsers, they could be different absolute sizes, given a default font size.
- Safari and Chimera have default margins within a pixel or two of each other.
- IE/Mac has slightly smaller margins than Safari or Chimera.
- Opera's margins are very close to Safari's and Chimera's, but its default linespacing is slightly larger.
- OmniWeb's inter-paragraph margins are the same as IE's but its default margins on its headings are smaller than both IE's heading margins and OmniWeb's own inter-paragraph margins. Its default linespacing appears to be slightly larger.
- iCab has the smallest margins of all, and does not honor zero margin and padding styles on BODY.
- Chimera is the only one to impose the default top margin of a block element when that element is the first thing on the page. The others all run that block element right up against the top of the viewport.
- Chimera and Safari are the only ones to get backgrounds on lists correct.
CodeBitch
19 January 2003