I am trying to create a div which is 100 viewheight. Inside the div is a h1 placed. The h1 enlarges the div so it isn't 100 viewheight anymore. It shouldn't have a scrollbar like right now in the example below. I searched on this question for a answer but didn't found anything.
How can I add a h1 element to a div with 100 viewheight, without enlarging the div? Why is it enlarging it?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Test</title>
</head>
<body style="margin: 0;">
<div style="height: 100vh; background: yellow;">
<p>Test</p>
</div>
</body>
</html>