<div class="grid">
  <h1>centred</h1>
</div>
.grid {
  display: grid;
  place-content: center;
  min-height: 100vh;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.