I just finished the Code School's Functional HTML5 & CSS3 and I noticed several times they emphasized that the <header>
element should contain <h1>
heading (not <h2>
, <h3>
etc.) but they did not explain why.
Why is that? What makes the <h1>
so special that it is the one that we should include in <header>
?
the header
of the page is like the header of a document, you'll usually find the main title of the document there. The main title of a webpage is usually put into an h1, but headers can contain lots of other things like a logo, publication date and other metadata. On many websites, the sit's header also contains its navigation.
h1
is the primary (ie: the most important) header.
The header
tag is not limited to only containing the h1
, but as it is the most important header on the page, that may often be the case.
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