Writing minimal HTML pages to test dark corners of CSS is far and away the best way to learn the box model, alignment, and so on.