- Q1: What is the CSS box model?
- All HTML elements are considered as "boxes". These boses utilize a model called the "Box Model" becuase of the layout and design of said boxes. It is
essentially a box that wraps around HTML elements (content), which
consists of: Margin, Border, Padding, and the Content.
- Q2: What is the difference between margin and padding?
- Margin is the "outer" space of an element
(surrounding Border, which surrounds Padding).
Padding is the "inner" space of an element. So Margin is the
space outside the element's border, while
Padding is the space inside the border.
- Q3: How is an HTML element height and width determined?
- Every HTML element comes with
its own dimensions of Margin / Border / Padding, and these help
to determine the objects total Height and Width. You can change
each of these elements' dimensions, as well as declaring the
height and width directly.
- Q4: Explain this CSS property: padding:25px 50px;
- This property will increase the vertical padding
by 25px, as well as the horizontal padding by 50px. This
is because this exact property is saying Top-Bottom 25px,
and Right-Left 50px.
- Q5: What is the difference between a border and an outline?
- The difference between a border and
an outline is that
a border lets you specify the style and color of an HTML
element's border. An outline is just a line that
is drawn surrounding an element (outside the border). An
outline does not take up any space.