I just read about the header tag not being equal to section. The author says, header should not be used outside a section, but he doesn't tell us, how the sites header and footer have to look like. Are they sections? Divs maybe? Or does body count as a section and I can use header and footer like I used to?
-
check out this link this can helps you in your answer http://stackoverflow.com/questions/4781077/html5-best-practices-section-header-aside-article-tags – Mehar May 29 '13 at 10:42
-
1That doesn't answer my question. One answer there even says that header is to be used only for site header, which is definitely not correct. The answer marked as correct explains the HTML5 elements, but I already know that. It says, that you can have "as many headers as you want", but doesnt tell as, how THE headr has to look like. In my understanding, the site header has to be a section, but I'm not shure. – Sebastian Starke May 29 '13 at 10:49
2 Answers
A header element is intended to usually contain the section's heading (an h1–h6 element or an hgroup element), but this is not required. The header element can also be used to wrap a section's table of contents, a search form, or any relevant logos.
From my understanding of this, headers just group together elements to identify them as part of a header. The appearance is determined by the elements within the header.

- 140
- 9
The header is the page title. In HTML5, there is a new tag named <header>
that is used to format this section. The header usually contains the site name and logo, maybe a notice, and sometimes the page name for simple, one-page sites. A <section>
is a block of content in the page. A header is basically a special section with a tag just for it because it is so common in webpages, similar to how <nav>
is a special section on the page just for navigation links, but is not put in a <section>
tag.
-
The spec says: "A header element typically contains the section’s heading". So do I have to wrap everything into a section, or does the body element count? – Sebastian Starke Jan 12 '14 at 12:46
-
The body element counts. Sections are typically used instead of divs to group special parts of pages, and the header and nav elements are special sections because divs were used so commonly in these areas. Given that, my web design teacher wanted us to put everything in a section named 'content' within the body. – Jan 12 '14 at 17:15