HTML <header> Tag

If this site has been useful, we’d love your support! Running this site takes time and resources, and every small contribution helps us keep creating valuable content. Consider buying us a coffee to keep things going strong!

Description

The HTML <header> tag is used to define a container for introductory content or a set of navigational links at the top of a web page. It typically includes elements such as the website's logo, the site title, a navigation menu, or other important information that should appear prominently at the beginning of a webpage. The <header> element is an essential part of creating a structured and accessible webpage, providing context and easy access to key information for users and search engines.

Properties

Permitted Parents
Any element that accepts flow content. Note that a <header> element must not be a descendant of an <address>, <footer> or another <header> element.
Content
Block, Inline and text elements, but no <header> or <footer> descendants.
Start/End Tags
Start tag: required, End tag: required

Example

<!DOCTYPE html>
<html>
<head>
<title>Untitled 1</title>
</head>
<body>
<header>
<h1>Header of Page</h1>
</header>
<article>
<p>Description and information of page goes here.</p>
</article>
<footer>
Footer of Page - Copyright
</footer>
</body>
</html>

Attributes

None

Global Attributes

The <header> tag also supports the Global Attributes in HTML5

Event Attributes

The <header> tag also supports the Event Attributes in HTML5

Browser Support

The following table will show you the current browser support for the HTML <header> tag.

Desktop
Edge Chrome Firefox Opera Safari
125411.15
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
18411.14.214.4

Last updated by CSSPortal on: 30th September 2023