Suggest an editImprove this articleRefine the answer for “What does margin do?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**`margin`** is the outer spacing around an element that creates space outside the block and separates it from neighboring elements, without affecting the inner size or being painted with the background. **Key point:** margin can collapse vertically with the margin of neighboring blocks (margin collapsing).Shown above the full answer for quick recall.Answer (EN)Image`margin` is the outer spacing around an element. It creates space **outside** the block, separating it from neighboring elements. Structure: ```javascript content → padding → border → margin ``` Characteristic features: - does not affect the element's inner size - **is not painted with the background** (the background does not extend to the margin) - can collapse vertically with the margin of neighboring blocks (margin collapsing) - serves solely as outer spacing between elements Example: ```css div { margin: 20px; } ``` In this case, the block will have 20px of outer spacing on all sides.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.