Homework 4 Extra Credit

What is the CSS box model?

The Box model refers to how HTML elements are modeled in browser engines. As mentioned in class, HTML elements can be seen as boxes. These boxes can then be modeled using CSS.

What is the difference between margin and padding?

The easy answer is that margin deals with the positioning on the ourside of the box and padding deals with the positioning inside the box.

How is the total height and width of an HTML element determined?

The total height of an element can be determined by adding height, top and bottom padding, top and bottom border, and top and bottom margin. Total width is determined by adding width, right and left padding, right and left border, right and left margin.

Explain this CSS property: padding: 25px 50px;

This will set top and bottom padding to 25px and right and left padding to 50ox.