Suggest an editImprove this articleRefine the answer for “How margin differs from padding”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**`padding`** is the inner spacing inside an element (between content and border) that is painted with the background and, with `content-box`, increases the block's size, while **`margin`** is the outer spacing past the border that is not painted with the background and does not affect the block's size. **Key point:** padding is inside the element, margin is outside.Shown above the full answer for quick recall.Answer (EN)Image**The core difference:** | Property | Where it acts | What it's used for | Painted with background | Affects block size | |---|---|---|---|---| | `padding` | **inside** the element, between content and border | pushes content away from the edge | yes | yes, with `content-box` it increases the block | | `margin` | **outside** the element, past the border | creates distance between elements | no | no, does not affect the inner size | **The key difference:** - `padding`, inner spacing (part of the element) - `margin`, outer spacing (space around the element) Both create space, but **padding is inside, margin is outside**.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.