The CSS margin-bottom property is used to specify the amount of margin to be used on the bottom of an element. The margin can be set in terms of length or percentage.-
The margin-bottom property sets the bottom margin of an element.
Note: Negative values are allowed.
Top and bottom margins of elements are sometimes collapsed into a single margin that is equal to the largest of the two margins.
This does not happen on horizontal (left and right) margins! Only vertical (top and bottom) margins!
In the example above, the <p class="a"> element has a top and bottom margin of 30px. The <p class="b"> element has a top and bottom margin of 20px.
This means that the vertical margin between <p class="a"> and <p class="b"> should be 50px (30px + 20px). But due to margin collapse, the actual margin ends up being 30px!