Margin is the space outside a box on a webpage, keeping it apart from nearby boxes. Think of the gap between two pieces of furniture: it is not part of either item, but it stops them from crowding each other.

For example, a heading might have margin below it so the next paragraph does not touch the words. Changing the margin moves neighboring content farther away or closer.

Margin is different from padding, which is space inside a box around its own content. This distinction helps when you want to move an item without changing the breathing room inside it.