Design glossaryThe midline, or mean line, is the line that marks the top of the short lowercase letters, such as x and o. Its distance from the baseline is the x-height.
The midline, also called the mean line or x-line, is one of the invisible guidelines type designers draw letters on. It runs across the top of the short lowercase letters, such as a, c, e, m, n, o, and x. Despite the name, it is not the middle of the letters: it marks their top.
Together with the baseline, the line letters sit on, the midline frames the main body of lowercase text. The distance between the two is the x-height, one of the measurements that most affects how large and readable a typeface looks.
The lines of a typeface
From top to bottom, the main horizontal guides are:
- Ascender line: the top of tall lowercase strokes in b, d, h, k, and l (see ascender).
- Cap height: the top of flat capital letters such as H and E (see cap height). It is often slightly below the ascender line.
- Midline: the top of the lowercase x-height letters.
- Baseline: where most letters sit.
- Descender line: the bottom of the tails in g, p, q, and y (see descender).
Round and pointed letters such as o, e, and v slightly overshoot the midline and baseline. If they stopped exactly at the line they would look smaller than flat letters like x and z, so designers let them cross it a little.
Why the midline matters
Where the midline sits in relation to the cap height decides the character of a typeface. A high midline gives a large x-height, open letters, and text that reads well at small sizes; many fonts designed for screens take this approach. A low midline gives a small x-height and long ascenders, which looks more classical and elegant but smaller at the same font size.
That is why two fonts set at the same size can look quite different in size, and why swapping a font can change how much text fits in a line.
The midline in CSS
CSS refers to the x-height in a few places, which makes the midline practical on the web:
- The
exunit equals the x-height of the current font, so1exis the distance from baseline to midline. vertical-align: middlecenters an inline element, such as an icon, on a point half an x-height above the baseline, which lines it up with the middle of lowercase text rather than capitals.font-size-adjustscales a fallback font so its x-height matches the intended font, keeping text a similar size while web fonts load.