font-variant-numeric
Controls how numbers are displayed. You can use it to create 'old-style' numbers, slashed zeros (to distinguish 0 from O), or fractions.
It is documented as part of the CSS Fonts specification.
Syntax
/* Usage Example */
.pricing-table {
/* Uses slashed zeros and tabular numbers for better alignment */
font-variant-numeric: slashed-zero tabular-nums;
}
/* Syntax */
font-variant-numeric: normal;
font-variant-numeric: ordinal;
font-variant-numeric: slashed-zero;
/* Global values */
font-variant-numeric: inherit;
font-variant-numeric: initial;
font-variant-numeric: revert;
font-variant-numeric: revert-layer;
font-variant-numeric: unset;
font-variant-numeric Browser support
Widely available
Since
2020 96% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.
52+
34+
9.1+
79+