108k views
22 votes
What is the difference between margin and padding property?

User Jsnjack
by
4.7k points

1 Answer

9 votes

Answer:

Margin is applied to the outside of your element hence affecting how far your element is away from other elements.

Padding is applied to the inside of your element hence affecting how far your element's content is away from the border.

Step-by-step explanation:

Hope it helps!!!

User Linton
by
5.7k points