Menu
The header
HTMLtag is a container for introductory content, such as a logo and a navigation menu. It can also be used in multiple areas on the page, like inside an <article>
tag, but it cannot be placed within a <footer>
, <address>
, or another <header>
tag.
Here’s an example of a document with multiple headers:
<body>
<header>
<a href="https://example.com"><img src="/assets/images/logo.jpg" alt="Example Logo">
</header>
<article>
<header>
<h1>This is the title</h1>
<p>Written by John Doe</p>
</header>
<p>This is some additional content.</p>
</article>
</body>
User-submitted codepen.io examples of <header>
↴
Submit a codepen.io link that demonstrates <header>
: