Why does the margin-top: 10px; of the <h4> tag exist but not be included in the box model?

this picture shows the

tag of this module, and you can see the margin: with 10px

on it.

10px margin :

Chrome h4 css :

guys, what on earth is going on?

< hr >

Please let me know if you need any more code to display.

Mar.12,2021


margin merge
https://developer.mozilla.org.


personal opinion: the height of the div box (if the declaration height is not displayed) is determined by the real content of the internal child elements, while the margin is not counted in the real content. You can view the console, and the real content is within the solid line

.

-supplement-

you can try to increase the property, within the h4 solid line, and you can find that the height of the div will change accordingly

Menu