HTML header - how to use <header> tag

The HTML <header> tag is used to define the header content of a HTML document or an <article> tag. The <header> tag for the document usually contains navigation links, intro content and usually contains the heading for the document or the <article> tag.

Since a page can contain multiple <article> tags, a HTML document can contain multiple <header> tags.

A <header> tag cannot contain other <header> tags and it cannot be placed within a <footer> or <address> tag.


The <header> tag supports the global and event attributes.


<html> <head> <title></title> </head> <body> <header> <h3>Demo</h3> <nav></nav> </header> <article> <header> <h4>Another demo</h4> </header> </article> </body> </html>