We are going to go back to basics and talking about margin and padding properties again, expanding on a previous post by Valentin Garcia.
When we start styling an HTML element with CSS, it is treated like a box by default. Border, margin, and padding are properties that affect the appearance of the box’s edges. Very simply, margin is the area on the outside of a box’s border and padding is the area on the inside of a border. The purpose, mostly, is to add space between elements for better design and readability.
Ready to dig in? Let's get started.