HTML Header Element


Example

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.

Note: The header element is not sectioning content; it doesn’t introduce a new section.


Examples:

<header>
  <p>Welcome to...</p>
  <h1>Voidwars!</h1>
</header>

In this example, the <article> has a <header>.

<article>
  <header>
    <h1>Flexbox: The definitive guide</h1>
  </header>
  <p>The guide about Flexbox was supposed to be here, but it turned out Wes wasn’t a Flexbox expert either.</p>
</article>

W3C Proposed Recommendation