This has been boggling my mind for a while. While writing code, I noticed that there are only 6 <h>
tags, which are:
<h1>
<h2>
<h3>
<h4>
<h5>
<h6>
I would really like to know why there are only 6, and not, well, an infinite number!
PS. I'm sorry if this is not the correct place to ask this question. If it isn't, please point out to me where I should instead ask this question.
HTML was written as an SGML application. Each element type had to be defined explicitly (DTDs provide no way to define element types with wild cards), so an infinite number could not be defined.
6 was presumably chosen because it was assumed that nobody would need a sub-sub-sub-sub-sub-sub-heading. Very few documents come close to that level of subdivision of sections.
The sectioning rules in HTML 5 effectively give an unlimited number of levels of headings, but tool support for the new sectioning algorithm is still weak.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With