Hello world!
The difference between margin and padding is that margin is extra space outside the div area, while padding is the space that's left unused inside the div area. You can specify the padding, like you do margins in one of the following ways:
NOTE: The padding is in addition to the width. So if a division is 400px with a padding of 50px all around then the true width of the divsion will be 400+50(right)+50(left)=500px.
NOTE: By default browsers have a margin and padding built into them. If you want to get rid of these you would have to create a style sheet for "body" and/or "headings" or "paragraphs" and set the margin and padding to 0. In this webpage I have removed the margins and padding for both "body", "headings" and "paragraphs" so compare it with any other webpage I have developed
NOTE: Also, different browsers have different defaults. To make sure that all browsers behave consistently research and implement CSS Reset.
In this division I am going to apply a margin of 25 px (top/down) and a margin of 50px (right/left) and a padding of 25px (top/down) and a padding of 50px (right/left) using two parameter.
In this division I am going to apply a margin of 25 px and a padding of 50px using one parameter.
In this division there is no margin but only padding of top 50, right 100, bottom 150 and left 200 px.