What is the difference between margin and padding in CSS?
Padding sets space between a border and an element content. Margin sets space between a border and other outer elements.
When elements need space between them it's better to use margin. When text or inner elements need space between the parent element (box) and the text itself, then padding should be used.
Continue reading here: Forms in HTML5
Was this article helpful?