Learn web design and programming with our free video and text tutorials.
Web Designer? Design and market your own professional website with easy-to-use tools.
A margin is the space outside of an (X)HTML element, which is outside of the border, inside of the border is the padding, which is the space in between the border and an HTML element.
The image below should give you a clearer idea of how the margin, border, padding and the (X)HTML element fit together.
How To Specify the Margins of an (X)HTML element
This tutorial shows you how to specify the margins of an (X)HTML element using 1 of 2 shorthand properties and also
how to specify each side individually.
How To Specify the Padding of an (X)HTML Element
This tutorial shows you how to specify the padding of an (X)HTML element using 1 of 2 shorthand properties and also
how to specify each side individually.