Q.What is the CSS box model?
A.The CSS box model is essentially a box that
wraps around HTML elements that consists of:
margins, borders, padding, and actual content.
All things that can be modified by the user for
organization, aesthetic, and dynamic purposes.
Q.What is the difference between margin and padding?
A.Margin is the area around an element (outside the border).
The margin has no background color, and is transparent
Padding is the area within an element (inside the border).
The padding is affected by the background color of the element.
Q.How is an HTML element height and width determined?
A.The height and width is determined by summing all margin,
padding, and outline widths together.
Q.Explain the CSS property: padding: 25px 50px
A.This is one of many ways of declaring a padding specification.
It's a short-hand declaration that makes the top and bottom padding
of the CSS box 25px apart and the right and left padding to be 50px apart.
Q.What is the difference between a border and an outline?
A.A border is the inner most outline of the CSS box model
The border is part of the box model and it's what surrounds
the HTML elements. The outline is the outer most outline of
the CSS box model, and it represents the contained div element.
Ultimately, the outline is what contains everything within a
CSS box model: the margin, border, padding, and content.