AUTO SIZE IMAGE TO FIT CONTAINER
Run
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML</title>
<style>

  div {
        width: 40%;
        height: 200px;
      }
  img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
   
</style>
</head>
<body>
    <h2> Auto-resize image to fit container</h2>
	<div>
		<img src="https://s3.ap-south-1.amazonaws.com/s3.studytonight.com/tutorials/uploads/pictures/1627986342-101156.png" alt="image">
		
	</div>
	
</body>
</html>