Horizontal:  No margin collapse: Declared margin values are retained and margins butt against each other. Element overlap is possible, given some sufficiently large negative margin value.

1111111111
2222222222

3333333333
4444444444

5555555555
6666666666

GGGGGGGGGG
HHHHHHHHHH


Vertical:  Margins collapse to one shared margin. If both are positive, the larger value determines the margin. If a positive/negative mix, add values to give shared margin value, which can cause element overlap.

7777777777
8888888888

9999999999
AAAAAAAAAA

BBBBBBBBbbbbbBB
CCCCCCCCCC

DDDDDDDDDD
EEEEEEEEEE

PPPPPPPPPP
QQQQQQQQQQ


mmmmmmmmmm
nnnnnnnnnn