HTML - Heading elements

h1, h2, h3, h4, h5 and h6.

The W3C HTML5 specification describes six HTML heading elements: h1, h2, h3, h4, h5 and h6.  ref

The height of a heading element is specified in the browser's default stylesheet. See col 4 below.  ref

The height of 1 em is usually 16 pixels.

The em is a unit of measure from the field of printed type, and is equal to the width of the letter M.  ref

HTML element

rank example text default stylesheet pixel height
<h1> </h1> 1


font-size: 2em
font-weight: bolder

32 px
<h2> </h2> 2


font-size: 1.5em
font-weight: bolder

24 px
<h3> </h3> 3


font-size: 1.17em
font-weight: bolder

18.72 px
<h4> </h4> 4


font-size: 1em
font-weight: bolder

16 px
<h5> </h5> 5

font-size: .83em
font-weight: bolder

13.28 px
<h6> </h6> 6

font-size: .75em
font-weight: bolder

12 px

Ads by Google

Ask a question, send a comment, or report a problem - click here to contact me.

© Richard McGrath