English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Reference

HTML: <header> tag

The HTML <header> tag is an HTML5element, which defines a header that typically contains a logo, search form, and introductory information in an HTML document. This element is also commonly referred to as the <header> element.

Online Example

Create a <header> tag followed by an <article> tag:

!doctype html
<html>
<head>
<meta charset="UTF-8">
<title>HTML5 header tag usage (Basic Tutorial Website oldtoolbag.com)</title>
</head>
<body>
<header>
  <img src="/static/images/logo.png" alt="Logo">
</header>
<article>
  <h1>Heading for Article</h1>
  <p>Text that appears under article</p>
</article>
</body>
</html>
Test to see ‹/›

Browser compatibility

IEFirefoxOperaChromeSafari

IE 9, Firefox, Opera, Chrome, and Safari support the <header> tag.

Note:IE 8 or earlier versions of IE browsers do not support the <header> tag.

Tag definition and usage instructions

The <header> tag defines a page header for a document or a section of a document.

The <header> element should be used as a container for introductory content or a navigation link bar.

In a document, you can define multiple <header> elements.

Note:The <header> tag cannot be placed inside <footer>, <address>, or another <header> element.

HTML 4.01 and HTML5differences between

The <header> tag is a part of HTML 5 new tags.

Global attributes

Support for <header> tag Global attributes of HTML.

Event attributes

Support for <header> tag HTML event attributes.