Margin Collapsing Concept
Concept Check Medium
Question
What happens when two block elements with vertical margins are stacked?
Hint
Adjacent vertical margins on block elements 'collapse'.
Explanation
When two block-level elements are stacked vertically, their adjacent vertical margins collapse — the resulting margin is the larger of the two, not the sum. This is called margin collapsing and only happens with vertical margins, not horizontal ones.
Related Resources
Related Lessons
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.