What's the html code for centering text horizontally and vertically in an empty html page?

I'm doing this:

<html>
<body>
<div style="position:absolute; top:50%; display:table">TEXT GOES HERE.</div>

</body>
</html>

But it just centers the text vertically that way. How do I make it both vertically and horizontally centered?
2 answers 2