CSS Box Model
CSS uses the Box Model concept for HTML element styling and design layout. The Box Model consists of four key parts.
- Content : Text or images. Other boxes can be nested here as well. You can add background designs in this part (e.g., background color, background image, etc.).
- Padding : The area around the content. This part is also included in the box background.
- Border : The outline of the box. You can set border color and other designs using CSS.
- Margin : The outside border that determines distances to other boxes. This part is not included in the box background, and it is always transparent.