<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<div class="container">
<div class="parent">
<p class="child">
Hello World!
</p>
</div>
</div>
</body>
</html>
.container {
width: 100%;
height: 300px;
border: 1px dashed navy;
border-radius: 15px;
}
.parent {
height: 200px;
width: 200px;
background-color: navy;
border-radius: 15px;
margin: auto;
margin-top: 50px;
margin-bottom: 50px;
}
.child {
font-family: arial;
font-size: 22px;
color: white;
background-color: navy;
text-align: center;
position: relative;
top: 50%;
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}