Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Default h5 and h6 fonts are smaller than normal text in HTML/CSS – why?
7 points by ssl232 on April 22, 2019 | hide | past | favorite | 2 comments
Maybe HN can help solve this little mystery. The default font sizes in HTML have, since at least 1998 [1], been .83em and .67em for h5 and h6, respectively, making them smaller than normal text by default (1em). This leads to the bizarre situation that without any styling, the h5 and h6 headings are smaller than the text they head!

Does anyone know why headings were made smaller than normal text? I bet the answer is buried in some mailing list from the mid 90s, but so far my searches have not been fruitful. Perhaps someone here was around at the time of, or was even involved in, this decision.

[1] https://stackoverflow.com/a/55711457/2251982



I'd imagine h5 and h6 were supposed to be used as headings for <small> text. Essentially things like legal text, footnotes, etc.


I can't say for certain but I think it has something to do with the old HTML font tag. It supported a "size" attribute between 1 and 7. 3 was the default so I think H5 and H6 might have corresponded to font tag sizes 1 and 2.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: