html h2 font size code example

Example 1: h1 default font-size

Default font-size

h1 ---> 32px   (2em)
h2 ---> 24px (1.5em)
h3 ---> 20.8px (1.3em)
h4 ---> 16px   (1em)
h5 ---> 12.8px (0.8em)
h6 ---> 11.2px (0.7em)

Example 2: html font size

<span style="font-size:20px;"></span>

Example 3: html font size

font-size:20px;

"default size is : +-16px;"

Example 4: h2 in px css

h1 is   32px   (2em)
h2 is   24px (1.5em)
h3 is 20.8px (1.3em)
h4 is   16px   (1em)
h5 is 12.8px (0.8em)
h6 is 11.2px (0.7em)

Example 5: html h1 size

h1  =>    32px    (2em)
h2  =>    24px  (1.5em)
h3  =>  20.8px  (1.3em)
h4  =>    16px    (1em)
h5  =>  12.8px  (0.8em)
h6  =>  11.2px  (0.7em)

Example 6: change font size of h1 in html

<style>
h1 { 
	font-size: 100px;
   }
</style>

Tags:

Html Example