Default HTML font size

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.

enter image description here


Live demo

Here's an easy way to check it:

HTML:

<p>Hello world</p>
<span></span>

JQuery:

$('span').text("Font-size is: "+($('p').css('font-size')));

Output on Screen:

Hello world

Font-size is: 16px

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.

Tags:

Html

Css