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 value | medium |
|---|---|
| Applies to | all elements and text |
| Inherited | yes |
| Percentages | refer to parent element’s font size |
| Computed value | an absolute length |
| Syntax | <absolute-size> | <relative-size> | <length-percentage [0,∞]> | math |
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

| Pixels that differ from Chrome | 9,604 |
|---|---|
| The same, on the page without the declaration | 1,402 |
| Largest difference on one colour channel | 45 of 255 |
| The same, on the page without the declaration | 45 of 255 |
The declaration takes effect differently from Chrome: the difference map shows where.
font-size:xx-large
renders differently

| Pixels that differ from Chrome | 6,942 |
|---|---|
| The same, on the page without the declaration | 1,402 |
| Largest difference on one colour channel | 45 of 255 |
| The same, on the page without the declaration | 45 of 255 |
The declaration takes effect differently from Chrome: the difference map shows where.
font-size:smaller
renders differently

| Pixels that differ from Chrome | 4,825 |
|---|---|
| The same, on the page without the declaration | 1,402 |
| Largest difference on one colour channel | 221 of 255 |
| The same, on the page without the declaration | 45 of 255 |
The declaration takes effect differently from Chrome: the difference map shows where.
font-size:larger
renders differently

| Pixels that differ from Chrome | 16,004 |
|---|---|
| The same, on the page without the declaration | 1,402 |
| Largest difference on one colour channel | 238 of 255 |
| The same, on the page without the declaration | 45 of 255 |
The declaration takes effect differently from Chrome: the difference map shows where.
font-size:50%
same effect as Chrome

| Pixels that differ from Chrome | 330 |
|---|---|
| The same, on the page without the declaration | 1,402 |
| Largest difference on one colour channel | 45 of 255 |
| The same, on the page without the declaration | 45 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.
font-size:xx-small
same effect as Chrome

| Pixels that differ from Chrome | 396 |
|---|---|
| The same, on the page without the declaration | 1,402 |
| Largest difference on one colour channel | 45 of 255 |
| The same, on the page without the declaration | 45 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.
font-size:x-small
same effect as Chrome

| Pixels that differ from Chrome | 528 |
|---|---|
| The same, on the page without the declaration | 1,402 |
| Largest difference on one colour channel | 45 of 255 |
| The same, on the page without the declaration | 45 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.
font-size:small
same effect as Chrome

| Pixels that differ from Chrome | 660 |
|---|---|
| The same, on the page without the declaration | 1,402 |
| Largest difference on one colour channel | 45 of 255 |
| The same, on the page without the declaration | 45 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.
font-size:math, font-size:medium
same effect as Chrome

| Pixels that differ from Chrome | 866 |
|---|---|
| The same, on the page without the declaration | 1,402 |
| Largest difference on one colour channel | 45 of 255 |
| The same, on the page without the declaration | 45 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.
font-size:large
same effect as Chrome

| Pixels that differ from Chrome | 998 |
|---|---|
| The same, on the page without the declaration | 1,402 |
| Largest difference on one colour channel | 45 of 255 |
| The same, on the page without the declaration | 45 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.
font-size:20px
same effect as Chrome

| Pixels that differ from Chrome | 1,204 |
|---|---|
| The same, on the page without the declaration | 1,402 |
| Largest difference on one colour channel | 45 of 255 |
| The same, on the page without the declaration | 45 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.
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.
| Value | Measured |
|---|---|
xx-small | same effect as Chrome |
x-small | same effect as Chrome |
small | same effect as Chrome |
large | same effect as Chrome |
x-large | not 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