Having the HTML below
&l
That behavior is called collapsing margins. The margin values are not added but the higher value is used:
Vertical margins may collapse between certain boxes:
- Two or more adjoining vertical margins of block boxes in the normal flow collapse. The resulting margin width is the maximum of the adjoining margin widths. […]
- […]