Alec Sherlock


Questions for homework 4


Answers To Questions

  • The box model is a way to envision the design and layout of an HTML element by using boxes around the element to represent the margin, border, and padding around the content of the element.

  • Padding will add space within a specified element, margin will create extra space around the specified element.

  • There are a few ways to accomplish this. The easiest method would be to simply inspect the element within your browser. The second easiest would be to use the Javascript methods E.offsetWidth/E.offsetHeight (which returns the size + pading and border) or E.clientWidth/E.clientHeight (no padding and border)

  • The padding at the top of the element is 25px and the padding on the right is 50px.