Skip to content
Skip the list of specifications

font-size

matches Chrome on some values: 8 of 12 examples match Chrome

css-fonts-4

Some of the examples match Chrome and some do not: the count says how many, and the values that differ are listed first, each with its difference map.

The 4 that do not: font-size:xxx-large, font-size:xx-large, font-size:smaller, font-size:larger. They come first below, each with its difference map.

What the specification says

Initial valuemedium
Applies toall elements and text
Inheritedyes
Percentagesrefer to parent element’s font size
Computed valuean absolute length
Syntax<absolute-size> | <relative-size> | <length-percentage [0,∞]> | math

The definition in css-fonts-4

The measurements

12 examples: four render differently and come first and eight match Chrome. Each is one declaration on a small page, drawn by Chrome and by our engine. Drag on a picture to move the line between them.

font-size:xxx-large

renders differently
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome9,604
The same, on the page without the declaration1,402
Largest difference on one colour channel45 of 255
The same, on the page without the declaration45 of 255

The declaration takes effect differently from Chrome: the difference map shows where.

The example’s page

font-size:xx-large

renders differently
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome6,942
The same, on the page without the declaration1,402
Largest difference on one colour channel45 of 255
The same, on the page without the declaration45 of 255

The declaration takes effect differently from Chrome: the difference map shows where.

The example’s page

font-size:smaller

renders differently
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome4,825
The same, on the page without the declaration1,402
Largest difference on one colour channel221 of 255
The same, on the page without the declaration45 of 255

The declaration takes effect differently from Chrome: the difference map shows where.

The example’s page

font-size:larger

renders differently
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome16,004
The same, on the page without the declaration1,402
Largest difference on one colour channel238 of 255
The same, on the page without the declaration45 of 255

The declaration takes effect differently from Chrome: the difference map shows where.

The example’s page

font-size:50%

same effect as Chrome
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome330
The same, on the page without the declaration1,402
Largest difference on one colour channel45 of 255
The same, on the page without the declaration45 of 255

The pages differ by 330 pixels with the declaration and by 1,402 without it: what differs is there before the property (mostly the fonts), and the declaration does not add to it.

The example’s page

font-size:xx-small

same effect as Chrome
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome396
The same, on the page without the declaration1,402
Largest difference on one colour channel45 of 255
The same, on the page without the declaration45 of 255

The pages differ by 396 pixels with the declaration and by 1,402 without it: what differs is there before the property (mostly the fonts), and the declaration does not add to it.

The example’s page

font-size:x-small

same effect as Chrome
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome528
The same, on the page without the declaration1,402
Largest difference on one colour channel45 of 255
The same, on the page without the declaration45 of 255

The pages differ by 528 pixels with the declaration and by 1,402 without it: what differs is there before the property (mostly the fonts), and the declaration does not add to it.

The example’s page

font-size:small

same effect as Chrome
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome660
The same, on the page without the declaration1,402
Largest difference on one colour channel45 of 255
The same, on the page without the declaration45 of 255

The pages differ by 660 pixels with the declaration and by 1,402 without it: what differs is there before the property (mostly the fonts), and the declaration does not add to it.

The example’s page

font-size:math, font-size:medium

same effect as Chrome
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome866
The same, on the page without the declaration1,402
Largest difference on one colour channel45 of 255
The same, on the page without the declaration45 of 255

The pages differ by 866 pixels with the declaration and by 1,402 without it: what differs is there before the property (mostly the fonts), and the declaration does not add to it.

The example’s page

font-size:large

same effect as Chrome
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome998
The same, on the page without the declaration1,402
Largest difference on one colour channel45 of 255
The same, on the page without the declaration45 of 255

The pages differ by 998 pixels with the declaration and by 1,402 without it: what differs is there before the property (mostly the fonts), and the declaration does not add to it.

The example’s page

font-size:20px

same effect as Chrome
Chrome rendering
Ours rendering
Left of the line is ours, right of it Chrome’s rendering. Drag on the picture to move the line.
Pixels that differ from Chrome1,204
The same, on the page without the declaration1,402
Largest difference on one colour channel45 of 255
The same, on the page without the declaration45 of 255

The pages differ by 1,204 pixels with the declaration and by 1,402 without it: what differs is there before the property (mostly the fonts), and the declaration does not add to it.

The example’s page

Which values were measured

A match on one example means a match at the value tried. The property’s grammar has 13 branches, and 12 of them carry a measurement. At most 12 examples are published per property, so a branch past that is left out by our choice.

ValueMeasured
xx-small
same effect as Chrome
x-small
same effect as Chrome
small
same effect as Chrome
large
same effect as Chrome
x-largenot measured
xx-large
renders differently
xxx-large
renders differently
larger
renders differently
smaller
renders differently
20px
same effect as Chrome
50%
same effect as Chrome
math
same effect as Chrome
medium
same effect as Chrome

Measured against Chrome 148.0.7778.96 on 5 November 2026, with up to 40 candidate values tried per property. How it was measured