What exactly is the difference between margin and padding in CSS? It really doesn\'t seem to serve much purpose. Could you give me an examp
Padding allows the developer to maintain space between the text and it's enclosing element. Margin is the space that the element maintains with another element of the parent DOM.
See example:
Pseudo Elements
Notice the distance between the top and this text. Then compare it with the distance between the bottom border and the this text.