On this page
Identify the numerical reading task
Numbers in prose and numbers in a dashboard have different jobs. A date inside a sentence should blend into the paragraph; a column of prices should support rapid vertical comparison. A timer should not appear to wobble every second. Choose numeral behavior by task, not by one global preference for technical-looking text.
Use the px-to-rem converter to set up comparable numeric specimens at the same relative size. Include prices, percentages, negative values, dates, and a sequence of changing timer values. This keeps a size difference from being mistaken for improved alignment.
Before changing the font, check whether the existing family includes the OpenType features you need. Many proportional text families offer tabular digits, so adopting an entirely monospace face may be unnecessary.
Separate digit width from digit shape
Tabular numerals use equal advance widths for the digits. Proportional numerals let each digit use a width suited to its shape. This distinction is separate from lining versus oldstyle forms. Width and shape are independent choices when the font supplies the relevant combinations.
Lining numerals generally align around the capital-height region. Oldstyle numerals can have ascenders and descenders that blend into lowercase prose. Neither style is universally more readable; the best choice depends on whether numbers form structured data or part of a sentence.
The MDN font-variant-numeric reference describes the feature groups. A CSS declaration requests a feature; it does not manufacture missing font data. Confirm the chosen file supports the requested numerals. Also inspect currency signs and punctuation, because equal-width digits do not automatically make every entire formatted value equal in width.
Apply numeric features in CSS
Apply numeric settings to the content that needs them. A table of account balances may need lining tabular figures, while the surrounding article can retain the font's default numeral style. Keep those roles separate.
.amount,
.timer {
font-variant-numeric: tabular-nums lining-nums;
}
.editorial-date {
font-variant-numeric: proportional-nums oldstyle-nums;
}These declarations depend on font support. Compare enabled and disabled specimens to confirm they actually change the result. Use the MDN font feature guide to understand how high-level properties map to font features.
Prefer the descriptive property over an unexplained list of low-level feature tags when a standard property covers the task. It is easier to maintain and makes the design intent obvious. If you do need low-level settings for a font-specific feature, document both the tag and the visual problem it solves.
Test real financial and changing values
Build samples with 111.11, 888.88, zero, a negative amount, and a large value with grouping separators. Align monetary columns according to the comparison task, commonly along the trailing edge or decimal position. Tabular digits help, but do not replace suitable alignment or consistent formatting.
Test a timer through several values rather than freezing it at 00:00. Stable digit widths reduce width changes, but different digit counts still alter the overall string. Reserve enough room for the maximum expected format when the surrounding layout should remain stable.
Try currencies with different symbols and localized separators. A comma decimal mark, a narrow space group separator, or a trailing currency marker can change the visual structure. The MDN Intl.NumberFormat reference explains language-aware formatting. Typography and formatting must work together; neither should silently rewrite the meaning of a number. Keep language-specific examples in your typography collection.
Keep numeric choices local and documented
Do not enable tabular figures everywhere simply because they look orderly in a table. In flowing prose, proportional numerals may create more natural spacing. Conversely, a decorative oldstyle choice can be distracting in a dense numeric interface. Scope the feature to its purpose and preserve a sensible default elsewhere.
Check font fallback and the smallest intended size. Some digits can become difficult to distinguish even when their widths are perfectly aligned. Inspect 3 and 8, 5 and 6, and 0 and 9 in the actual rendering environment. Equal width is not a substitute for clear shapes.
Record the selected numeric styles with examples of their intended use. Include a warning if a fallback font lacks the feature. Share the specimen in your design references so designers and developers approve the same output. When the body family changes, rerun this numeric proof rather than assuming all OpenType behavior transfers unchanged.
Work through a balance-column example
Suppose a summary lists 9.50, 111.00, and 8,888.80 in one currency. First format every value with the same locale and two fraction digits. Then give the numeric cells trailing-edge alignment and enable tabular lining numerals. With a supported font, the two decimal places line up because the fractional digits have equal widths and each value uses the same separator. The thousands separator does not need to have digit width for this particular arrangement.
Now add an amount formatted with no fractional digits. Its right edge still aligns, but its decimal position no longer matches the other rows. That is a formatting-policy change, not a broken font feature. Either use consistent precision where the financial meaning permits it or design a deliberate decimal-alignment layout. Do not insert ordinary spaces to repair alignment: their widths and wrapping behavior are unsuitable for a reliable column.
Keep units consistent too. Mixing a trailing currency code into some cells but not others shifts the numeric edges. Put shared currency information in a clear column heading, or provide a consistently formatted unit field when the data genuinely mixes currencies. Never hide the currency merely to improve the visual alignment.
Verify feature support through visible output
Create two specimens containing repeated ones and repeated eights, each with the same digit count. In the tabular specimen, the strings should occupy equal advance widths when the font provides the feature. Compare the proportional specimen rather than assuming a CSS declaration proves the feature is present. Some families already default to tabular figures, so a missing visual difference is not automatically a failure.
For a live counter, include transitions such as 99 to 100 and negative to positive. Digit-count changes still need sufficient layout space even with tabular numerals. Reserve space using the actual longest formatted sample; a guessed character count may miss signs, separators, or localized units. Keep the original numeric text intact so copying a balance or reading it with assistive technology preserves its meaning.
Key takeaways
- Start with real content and tasks, not an isolated visual preference.
- Keep comparison sizes and widths consistent.
- Confirm the actual font supports the requested behavior.
- Test narrow screens, localization, and enlarged text.
- Record the decision with a reproducible specimen.
Reach designers & developers at work
Put your product next to the tools people use every day. One sponsor per placement, no tracking pixels.
Become a sponsor