Code below. Shouldn't it have 4rem gap? If I increase the div2 margin top to say 4, then the gap increases.
<!DOCTYPE html>
<html>
<body>
<h1>Margin test</h1>
<div style="border:5px solid red;margin-bottom:2rem;">Div 1</div>
<div style="border:5px solid green;margin-top:2rem;">Div 2</div>
</body>
</html>