1.

Explain the CSS box model.

Answer»

The CSS box model is an entity or a box under which HTML contents, or other ELEMENTS, are ENCLOSED. This box helps in creating layouts with CSS, adding borders, and defining space between elements. The CSS box model has four components that are:

  1. Content - It is the actual content that is displayed within the box.  
  2. Border - It is the border around the box that INCLUDES the content.  
  3. Padding - Padding is the EMPTY space between the content and the border.
  4. Margin -  Margin is the top layer of the box element. It is the empty space OUTSIDE the border of the box.



Discussion

No Comment Found