/* CSS */ .text-center-vh { display: grid; place-items: center; } <!-- HTML --> <div class="text-center-vh"> <h1>Center Text</h1> </div>