Question 2: what is a box model?



  • All HTML tags can be understood as a box model
  • The box model is mainly composed of four parts: content, padding, border and margin


Standard box model (W3C box model) content box

  • Box size = content

Weird box model (ie box model) border box

  • Box size = content + padding + border

The content / inspiration of the article is drawn from the following content