CSS min-width & max-width

<!DOCTYPE html>
<html>
<head>
  <style>
    .box {
      min-width: 200px;
      max-width: 500px;
      background-color: lightblue;
      padding: 20px;
    }
  </style>
  <title>Min and Max with in CSS</title>
</head>
<body>
  <div class="box">
    <h2>Resizable Box</h2>
    <p>This box has a minimum width of 200px<br>
	and a maximum width of 500px.</p>
  </div>
</body>
</html>

Code Output

CSS min-width and max-width

It allows you to set the minimum and maximum width, respectively, for an element. These properties are used to control the sizing behavior of elements based on the available space.