Eleeist
Eleeist

Reputation: 7041

Why <h1> in <header>?

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>?

Upvotes: 8

Views: 10068

Answers (2)

bigblind
bigblind

Reputation: 12887

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.

Upvotes: 7

podiluska
podiluska

Reputation: 51514

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.

Upvotes: 2

Related Questions