1
HTML/CSSBeginner#css#display
When two vertical margins of block elements touch (adjacent siblings, or a parent and its first/last child with no border/padding between), they collapse into a single margin equal to the larger of the two, rather than adding together.
<div style="margin-bottom: 20px;">A</div> <div style="margin-top: 30px;">B</div> <!-- gap between A and B is 30px, not 50px -->