This example shows four boxes with different height utilities:
h-16 sets a fixed height.min-h-screen makes the box at least as tall as the screen.max-h-40 limits the height and adds scroll if content is too big.h-full fills the height of its parent container (which is 100px tall here).
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Height Utilities Example</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="flex flex-col items-center justify-center min-h-screen bg-gray-100 gap-6 p-6">
<div class="bg-blue-500 h-16 w-32 text-white flex items-center justify-center rounded">h-16</div>
<div class="bg-green-500 min-h-screen w-32 text-white flex items-center justify-center rounded">min-h-screen</div>
<div class="bg-red-500 max-h-40 w-32 text-white overflow-auto rounded">
<p class="p-2">max-h-40 with overflow scroll if content is bigger. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
<div class="w-32" style="height: 100px;">
<div class="bg-purple-500 h-full w-full text-white flex items-center justify-center rounded">h-full inside 100px container</div>
</div>
</body>
</html>