-- Practice Midterm Solutions
Problem # 4: Briefly explain the box model used in rendering HTML elements, labeling its parts. Give stylings for each of these parts for a div tag where the sizes of the parts make use of the last digits of your student ID.
The box model is used in html to help with style layout, and has several parts: the margin, which is the amount of free space around the box, the border, which is a usually solid border that separates the box's content from the outside, the padding, which is like the margin but in between the border and content, and finally the content, which is where you put the lines/picutres/ whatever that you want to be shown within the box. an example of such, using a div tag is:
div {
width: 6px;
border: 4px;
padding: 7px;
margin: 7px;
}
Problem # 4: Briefly explain the box model used in rendering HTML elements, labeling its parts. Give stylings for each of these parts for a div tag where the sizes of the parts make use of the last digits of your student ID.
The box model is used in html to help with style layout, and has several parts: the margin, which is the amount of free space around the box, the border, which is a usually solid border that separates the box's content from the outside, the padding, which is like the margin but in between the border and content, and finally the content, which is where you put the lines/picutres/ whatever that you want to be shown within the box. an example of such, using a div tag is:
div {
width: 6px;
border: 4px;
padding: 7px;
margin: 7px;
}