<!-- !
Box Model -->
#### Definition:
- The CSS box model represents the structure of an element in terms of its
content, padding, border, and margin.
#### Components of the Box Model:
1. **Content**:
- The actual content of the element, such as text, images, or other media.
- Example: `width` and `height` properties define the size of the
content area.
2. **Padding**:
- The space between the content and the border.
- Example: `padding: 20px;` (applies padding equally to all sides).
3. **Border**:
- A line surrounding the padding (if any) and the content.
- Can be styled with different widths, colors, and styles.
- Example: `border: 1px solid black;` (sets a 1px solid black border).
4. **Margin**:
- The space outside the border, separating the element from adjacent
elements.
- Example: `margin: 10px;` (applies margin equally to all sides).
#### Box Model Properties:
1. **Width and Height**:
- Define the size of the content area.
- Example: `width: 100px; height: 50px;`.
2. **Padding**:
- Can be set individually for each side: `padding-top`, `padding-right`,
`padding-bottom`, `padding-left`.
- Example: `padding: 10px 20px 30px 40px;` (top, right, bottom, left).
3. **Border**:
- Can be set individually for each side: `border-top`, `border-right`,
`border-bottom`, `border-left`.
- Example: `border: 2px dashed red;` (applies to all sides).
- Detailed properties: `border-width`, `border-style`, `border-color`.
4. **Margin**:
- Can be set individually for each side: `margin-top`, `margin-right`,
`margin-bottom`, `margin-left`.
- Example: `margin: 5px 10px;` (top/bottom, right/left).
#### Box-Sizing Property:
- **`box-sizing`**:
- Defines how the total width and height of an element are calculated.
- `content-box` (default): width and height include only the content.
- `border-box`: width and height include content, padding, and border.
- Example: `box-sizing: border-box;`.