Why are headings not used as child elements?

Why do we not put <h2> and <h3> as child elements/grandchildren of h1 and subsequently body and html?

Headings are not generally treated as sectioning elements that contain child elements. They are intended as headings, not parents.

Got it, thanks! I saw in the further lessons <div> is closer to what I expected.

1 Like

Similarily we have,

article
section
li
blockquote
header
nav
footer
&c.

HTML 5.2: 3 Semantics, structure and APIs of HTML documents = Kinds of content

The above link is scrolled down quite a bit from the root of the page. Definitely bookmark it and add it to your reading list for down the road. Just this one page is like an intensive course in all the inner workings of HTML. Dry and technical, best nibbled on rather than gorged.

1 Like