{{HTMLRef}}
The HTML <header>
element represents a group of introductory or navigational aids. It may contain some heading elements but also other elements like a logo, wrapped section's header, a search form, and so on.
Usage note: The <header>
element is not sectioning content and therefore doesn't introduce a new section in the outline.
Content categories | Flow content, palpable content. |
---|---|
Permitted content | Flow content, but with no <header> or {{HTMLElement("footer")}} descendant |
Tag omission | {{no_tag_omission}} |
Permitted parent elements | Any element that accepts flow content. Note that a <header> element must not be a descendant of an {{HTMLElement("address")}}, {{HTMLElement("footer")}} or another {{HTMLElement("header")}} element.. |
DOM interface | {{domxref("HTMLElement")}} |
Attributes
This element only includes the global attributes.
Example:
<header> <h1>Main Page Title</h1>
<img src="mdn-logo-sm.png" alt="MDN logo"> </header>
Main Page Title
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', 'sections.html#the-header-element', '<header>')}} | {{Spec2('HTML WHATWG')}} | |
{{SpecName('HTML5 W3C', 'sections.html#the-header-element', '<header>')}} | {{Spec2('HTML5 W3C')}} |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | 5 | {{CompatGeckoDesktop("2.0")}} | 9.0 | 11.10 | 4.1 |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | 2.2 | {{CompatGeckoMobile("2.0")}} | 9.0 | 11.0 | 5.0 |
See also
- Others section-related elements: {{HTMLElement("body")}}, {{HTMLElement("nav")}}, {{HTMLElement("article")}}, {{HTMLElement("aside")}}, {{HTMLElement("h1")}}, {{HTMLElement("h2")}}, {{HTMLElement("h3")}}, {{HTMLElement("h4")}}, {{HTMLElement("h5")}}, {{HTMLElement("h6")}}, {{HTMLElement("hgroup")}}, {{HTMLElement("footer")}}, {{HTMLElement("section")}}, {{HTMLElement("address")}};
- Sections and outlines of an HTML5 document.