L4

Question 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.

Question 2:

What is the difference between margin and padding?

Ansewr: The difference between margin and padding is that while padding deals with the inner space, margin deals with the outer space to the next outer element. Padding is space inside the border, whereas Margin is space outside the border.

Question 3:

How is an HTML element height and width determined?

Answer: The height and width properties are used to set the height and width of an element. They are determined in pixels.

Question 4:

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

Answer: The CSS padding properties are used to generate space around an element's content, inside of any defined borders. The 25px defines top/bottom and 50px defines leaft/right respectively.

Question 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.