Book a call Free rebuild
Home/Glossary/Design/Cap Height

Cap Height

March 6, 2023 Updated November 16, 2026 2 min read

Design glossaryCap height is the height of a typeface's flat capital letters, such as H or E, measured from the baseline.

Cap height is one of the vertical measurements that define how a typeface sits on a line. It runs from the baseline, where letters rest, to the top of flat-topped capitals such as H, E, and I. Designers measure it on flat letters because round and pointed ones (O, C, A) are drawn to overshoot the line slightly so they look the same size.

Two typefaces set at the same font size can have quite different cap heights. That is why one font at 16 pixels can look noticeably larger than another at 16 pixels.

Cap height and other vertical metrics

  • Baseline: the line most letters sit on.
  • x-height: the height of lowercase letters without ascenders, such as x, a, and n.
  • Cap height: the height of flat capitals.
  • Ascender height: the top of tall lowercase letters such as b, d, and h. In many typefaces this rises a little above the cap height.
  • Descender depth: how far letters like g and p drop below the baseline.

Font size in CSS is not the height of any letter. It sets the size of the em square the glyphs are drawn in, and the cap height is some fraction of it. In many common text typefaces that fraction is around 70 percent, but it varies from face to face. Font files record the value in their metrics (the OpenType OS/2 table includes a cap height field), which is how browsers and design tools know it.

Why cap height matters on the web

Vertical centering

Browsers lay text out in a line box that includes room for ascenders and descenders, not just the capitals. A label in a button can therefore look slightly too high or too low even when the padding is equal, because the visible capitals are not centered in that box. Designers often compensate with a pixel of extra padding on one side. Newer CSS properties such as text-box-trim and text-box-edge can trim the line box to the cap height and baseline so text centers precisely; check current browser support before relying on them.

Pairing typefaces

When two fonts appear side by side, such as a heading face and a body face, or a fallback font while a web font loads, a big difference in cap height or x-height makes the swap obvious. Choosing fonts with similar proportions, or adjusting the fallback with size-adjust in @font-face, reduces the jump and the layout shift that comes with it.

All-caps text and icons

Navigation labels, buttons, and badges set in capitals depend entirely on cap height for their apparent size. Icons placed next to text usually look best when their height matches the cap height rather than the full font size. CSS Values Level 4 also defines a cap unit, equal to the cap height of the current font, which is handy for sizing icons to match.

Common mistakes

  • Assuming two fonts at the same size will look the same size.
  • Centering text in buttons by eye at one font, then switching typefaces and finding the label off center.
  • Sizing inline icons to the font size, which makes them tower over the capitals.
WP Services

WordPress services at revolutionary pricing.

Productized WordPress services, from builds to care, delivered by Seahawk and tracked in one app. For the WordPress lovers.