CSS units · Advance width of the glyph 0
ch and ex
ch is the width of the digit zero; ex is the font's x-height.
Key facts
| ch | Advance width of the glyph 0 |
|---|---|
| ex | x-height of the font |
| Dependency | Current font and size |
| Common use | Measure / line length |
| Fallback | Browsers synthesize if metrics are missing |
| Standard | CSS Values and Units Level 4 |
Font metrics as units
1ch is the advance width of the zero glyph in the current font, so it approximates the width of one character in a monospaced font and a typical digit in a proportional one. 1ex is the x-height, roughly half an em in many fonts but not guaranteed.
Both are useful when the design should follow the type rather than a fixed pixel value. A line length of 65ch is a common readability target for body text.
Caveats
The values change with the font family, weight and size, and a fallback font can shift them. A layout tuned with one webfont may reflow when the font fails to load. Browsers without the metrics may synthesize a value from the em size.
Do not use ch as a substitute for em in spacing systems. It is a text-measurement unit, not a general-purpose length.
Frequently asked questions
Does 1ch equal one character?
Only approximately, and exactly for the zero glyph. Proportional fonts have different widths per character.
What is a good line length in ch?
Around 45–75ch for body text, depending on the font and content.