CSS CSS Basics The Box Model Margins

Ermin Mekic
Ermin Mekic
1,063 Points

How to figure out the default font-size?

What if I don't set any specific font-size for a heading, how do I find out what the relative margin to the heading is? Is there a default font-size for h1, h2, h3, etc.?

Thank you.

hungryfr33lanc3r
hungryfr33lanc3r
8,403 Points

Hello, Ermin! If you do not set a font-size, 16px is the default that the browser will implent.

Read more here...

2 Answers

Steven Parker
Steven Parker
185,909 Points

The actual size depends on the browser and/or CSS, but here are some approximations:

H1  32px     
H2  24px
H3  18px    
H4  16px  (also plain inline text)
H5  13px
H6  10px
Regina Battle
Regina Battle
16,633 Points

It depends on the browser, but inspecting the element using developer tools can be helpful.

Here's a course using Chrome Dev Tools..