back to selector lesson

What is the difference between Margin, Border, and Padding?

In CSS, a margin is the space around an element's border, while padding is the space between an element's border and the element's content.

And.. Border - A border that goes around the padding and content. Margin - Clears an area outside the border. The margin is transparent.

Here are links for further information...




Hello World
Padding
Margin