🧠 The Core Concept:
Every element on a webpage is like a little rectangular “box.”
That box is made up of four layers:
1.Content → the text or image inside.
2.Padding → the space between the content and the border.
3.Border → the outline surrounding the padding.
4.Margin → the space outside the box, separating it from other boxes.
So, when you set:
width: 300px;
height: 200px;
you’re talking about the content box — unless you change box-sizing.
⚙️ The box-sizing Property Values:
1. content-box (default):
Think of this as the “old-school” box model.
-
The width and height apply only to the content.
-
Padding and borders are added on top of those dimensions.