The header element
Tuesday, June 16th, 2009 by Richard Clark.
Tweet
Recently, we have seen a growing interest in HTML5 and its adoption by web professionals. Within the HTML5 specification we can see that there have been a significant number of new elements added, one of these the <header> element is what we’ll be covering in this post. We’ll talk about when to use it, when not to use it, its must haves and must not haves. Ready? Let’s dive straight in.
Updated 15/12/2105 by Doctor Steve
So you’re used to seeing
<div id=”header”>
on a large majority of sites that you visit, well now with HTML5 that isn’t required anymore we can add some more semantic value with the <header> element.
What does the element represent?
According to the HTML spec the header element represents
…introductory content for its nearest ancestor sectioning content or sectioning root element. A header typically contains a group of introductory or navigational aids.
When the nearest ancestor sectioning content or sectioning root element is the body element, then it applies to the whole page.
It is important to note that the [...]