HTML Box Model Demo

This is the demo page for the code from the HTML Box Model CSS Padding, Border and Margin article.

Box Model Browser Defaults

Just a color added to the border.

Mona Lisa

Margin Space

Setting margins on the elements to zero:

Mona Lisa

All Together Now

Setting several margin, background and padding attributes.

Mona Lisa