I wanted to know if it is correct to put high numbers for the margin, for example I have this code, what I want is to put a text in the center of the screen, but I can't think of any other way, but I don't know if it is the most correct way Sorry if the question is too simple. But I can't find the information I'm looking for
div{
margin-top: 25%;
text-align:center
}
<!DOCTYPE html>
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Lexend+Tera&display=swap" rel="stylesheet">
</head>
<body>
<div>
<H1>Esto es una prueba</H1>
</div>
</body>
</html>
To put the div that contains the text in the center of the screen, use flexbox like this