As you have seen, padding is space added inside an element’s border, while margin is space added outside an element’s border. One additional difference is that top and bottom margins, also called vertical margins, collapse, while top and bottom padding does not.
Horizontal margins (left and right), like padding, are always displayed and added together.
Unlike horizontal margins, vertical margins do not add. Instead, the larger of the two vertical margins sets the distance between adjacent elements.
Watch video Crushing Codecademy PRO WEB DEVELOPMENT career path Challenge - Margin Collapse online without registration, duration hours minute second in high quality. This video was added by user Dusan Cajic 08 December 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 58 once and liked it 2 people.