HTML5: Purpose of <header> element?

What is the purpose of the <header> elements on a page?

Some tutorials treat <header> like it is for the “page heading”. Yet other websites treat <header> like it is a heading in a <secton>

I thought <header> was what you wrapped your page masthead in…

Very confusing!

W3 is the best resource for finding out what elements purpose is -

This looks pretty good…


‘Header’ and ‘footer’ are not restricted to the top and bottom of the page but can also be used in sections where a heading and footer can also make sense in relation to that section.

It all depends on the content but the flexibility is there.

This is an old article but mentions these points (note that hgroup has been deprecated now).

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.