I wonder what the default html font-size is and I can't find the answer.
What I mean is this :
What is the font size in pixels corresponding to this :
html { font-size: 100%; }
It could be useful to know this if you need to calculate rem font sizes.
The default is 16px.
If you create an HTML file with any text in it, open it in Chrome, you can check the computed styles.
In the W3 CSS specification, there is no definite default font-size
other than the relative value medium
.
That being said, a quick test with the developer versions of IE, Firefox, and Chrome all show that the de facto standard is 16px. I would be interested to see someone test this on mobile versions.
Edit: As of 2017-03-20, the stable versions of Chrome, Firefox, Edge, and IE on the desktop as well as Chrome, Firefox, and Opera on mobile all default to the de facto standard of 16px for font-size
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With