Homework 4: Asked and Answered

What is the CSS box model?

The CSS box model is the arrangement of elements; essentially it contains the content, padding, border, outline, and the margin.

What is the difference between margin and padding?

Padding is solely around the content; it is transparent and will take on any background color given. Whereas a margin adds space around the element's outline, border, padding, and content; it too is transparent but willnot take on an assigned color.

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

The total height and width of an HTML element is determined by whatever box type you choose to use. Your options are the content-box or the border-box, assuming no others come along in the near future.

Explain this CSS properly: padding: 25px 50px:

The coding above is used to set the padding deminsions of the top and bottom at 25 pixels and the right and left at 50 pixels