+ 7

What is different between Margin and Padding?

17th Aug 2017, 8:57 AM
Sunil Patidar
Sunil Patidar - avatar
4 Answers
- 5
No
17th Aug 2017, 8:39 PM
Serianu Florentina
+ 12
They have some differences: Margin is outer space of an element, while Padding is inner space of an element.Margin is the space outside the border of an element, while Padding is the space that is inside the border of it.
17th Aug 2017, 9:06 AM
Ekansh
+ 4
think of an html element as a box. so the margin is the space outside the box while padding space is within the box, the difference from the border and the element.
17th Aug 2017, 8:05 PM
Antony O. Onyango
Antony O. Onyango - avatar
0
Padding is the space between the textnode and the border while the margin is the space between the border of the element and that of the other element element border
9th Nov 2018, 8:25 AM
Odai Daniel
Odai Daniel - avatar