In W3 CSS and also in XUL/CSS? (not between CSS and XUL/CSS).
Padding is the space INSIDE an element (inside the border of the element).
Margin is the space OUTSIDE(Around) an element.
Padding is the area between the content and the border while the margin is the area outside the border.
See CSS box model for clarification.
I recommend this article for you. The diagram is from that article.
padding is part of the width of an element. margin is outside and isn't part of the width
Here's an interesting box model demo that will help you understand.
OK, several of these answers use confusing terminology and are wrong.
The css width of an element does not include padding, borders, or margin.
Therefore it is imprecise to say "padding is inside an element".
It is correct to say "padding is inside the border of an element" and "margin is outside the border of an element".
To calculate how much space a box takes up (for example, just horizontally):
horiz. space = width + 2(padding) + 2(border) + 2(margin)
It bugs me when people say "padding is space inside an element" because: the element has padding, it has a border, and it has margin. All of that stuff is outside the content width of the element, and must be accounted for when calculating how much space the element takes up.
If you say "padding is inside the element" then you are making the same mistake MSIE did in its broken box model, causing untold web designers many headaches.
http://www.456bereastreet.com/archive/200612/internet_explorer_and_the_css_box_model/