Default Browser Typography Sizes


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. body {
  2. font-size: 0.625em;
  3.  
  4. /* Because the browser's default font size is 16 pixels, we have now reduced the body font size to 10 pixels, which is easier for calculations. */
  5.  
  6. }
  7.  
  8. p { font-size: 1.4em; } /* 14px */
  9. h1 { font-size: 4.8em; } /* 48px */
  10. h2 { font-size: 3.6em; } /* 36px */
  11. h3 { font-size: 2.4em; } /* 24px */
  12. h4 { font-size: 2.1em; } /* 21px */
  13. h5 { font-size: 1.8em; } /* 18px */
  14. h6 { font-size: 1.6em; } /* 16px */

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.