CSS Grid vertical center

This is vertically and horizontally centered.

HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CSS Grids - vertical centering</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>
<body>
<main>
<h3>Welcome to CSS Grids!</h3>
<p>I'm vertically &amp; horizontally centered.</p>
</main>
</body>
</html>

CSS

body, html {
margin: 0;
height: 100%;
display: grid;
color: white;
background: #333 url(https://placeimg.com/1200/900/nature) no-repeat center center;
background-size: cover;
}

main {
padding: 2%;
max-width: 940px;
text-align: center;
margin: auto;
background-color: rgba(0, 0, 0, 0.5);
}