CSS height property
The height
property sets the element's height. Same as width
, its value doesn't include padding, border, or margin by default. The content of a section <div>
with height: 96px;
will take up exactly 96px vertically. However, to calculate the total size of the element, you'd need to add margins, borders, and padding size on both sides.
Pro Tip: Avoid setting fixed width and height unless necessary.