font-variant-numeric

The font-variant-numeric CSS property controls the usage of alternate glyphs for numbers, fractions, and ordinal markers.

Example

Initial value normal
Applies to all elements. It also applies to ::first-letter and ::first-line.

Syntax

  
font-variant-numeric: tabular-nums;
  

Values

This keyword leads to the deactivation of the use of such alternate glyphs.
This keyword forces the use of special glyphs for the ordinal markers, like 1st, 2nd, 3rd, 4th in English or a 1a in Italian. It corresponds to the OpenType values ordn.
This keyword forces the use of a 0 with a slash; this is useful when a clear distinction between O and 0 is needed. It corresponds to the OpenType values zero.
These values control the figures used for numbers. Two values are possible: lining-nums activating the set of figures where numbers are all lying on the baseline. It corresponds to the OpenType values lnum. oldstyle-nums activating the set of figures where some numbers, like 3, 4, 7, 9 have descenders. It corresponds to the OpenType values onum.
These values controls the sizing of figures used for numbers. Two values are possible: proportional-nums activating the set of figures where numbers are not all of the same size. It corresponds to the OpenType values pnum. tabular-nums activating the set of figures where numbers are all of the same size, allowing them to be easily aligned like in tables. It corresponds to the OpenType values tnum.
These values controls the glyphs used to display fractions. Two values are possible: diagonal-fractions activating the set of figures where the numerator and denominator are made smaller and separated by a slash. It corresponds to the OpenType values frac. stacked-fractions activating the set of figures where the numerator and denominator are made smaller, stacked and separated by a horizontal line. It corresponds to the OpenType values afrc.

Browser support

font-variant-numeric527934399.1

We use cookies to improve your experience. Learn more in our Privacy policy.

×