body{
margin: 0;
padding: 0;
}
.banner{
background-image: url(https://i.picsum.photos/id/104/1080/1080.jpg?hmac=Brz_-6-VYsQ9KEX9MY1WI7kPaC0MO5piVgpn3vbWD34);
background-color: #cccccc;
background-repeat: no-repeat;
background-size: cover;
background-position: center;
height: 500px;
}
.banner_text{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
}
h1{
margin: 0;
font-size: 48px;
}
p{
font-size: 18px;
margin-top: 30px;
}
.search_outer{
margin-top: 10px;
}
<html>
<body>
<div class="banner">
<div class="banner_text">
<h1>Welcome to Qtrip</h1>
<p>Explore the world with fantastic places to venture around</p>
<div class="search_outer">
<label>Search</label>
<input type="text">
</div>
</div>
</div>
</body>
</html>
You can achieve this result with the help of the display flex property.