Utilities for setting the height of an element.
Use h-<number> utilities like h-24 and h-64 to set an element to a fixed height based on the spacing scale:
Use h-full or h-<fraction> utilities like h-1/2 and h-2/5 to give an element a percentage-based height:
Use the h-screen utility to make an element span the entire height of the viewport:
<!-- [!code classes:h-screen] -->
<div class="h-screen">
<!-- ... -->
</div>Use the h-dvh utility to make an element span the entire height of the viewport, which changes as the browser UI expands or contracts:
Use the h-lvh utility to set an element's height to the largest possible height of the viewport:
Use the h-svh utility to set an element's height to the smallest possible height of the viewport:
Use utilities like size-px, size-4, and size-full to set both the width and height of an element at the same time: