Lab4 - Questions

1:

What is the CSS box model?

Answer:

"All HTML elements can be considered as boxes. In CSS, the term "box model" is used when talking about design and layout. The CSS box model is essentially a box that wraps around every HTML element. It consists of: margins, borders, padding, and the actual content."

2:

What is the difference between margin and padding?

Answer:

"padding is the space between the content and the border, whereas margin is the space outside the border."

3:

How is an HTML element height and width determined?

Answer:

The initial creator of the HTML element sets the height and width of their elements. This is done by using CSS commands either inside the source code or in an external CSS file. This is completed in many ways, one such example is be displaying the following code here:
height: 200px;
width: 50%;

4:

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

Answer:

If you think of padding as bubble-wrap, then package the contents of the predetermind box with a 25x50 coverage of bubble-warp. The top will have a padding top and bottom set to 25px, and the sides will be set to 50px.

5:

What is the difference between a border and an outline?

Answer:

The CSS border properties allow you to specify the style and color of an element's border. An outline is a line that is drawn around elements (outside the borders) to make the element "stand out". The outline shorthand property sets all the outline properties in one declaration.