Advertisement
❮ Previous: <head> Next: <hr> ❯

<header>

HTML <header> Tag

Example

<header>
  <h1>Title of the document</h1>
  <p>By John Doe</p>
  <p>On Sunday, <time datetime="2020-01-01">1 January 2020</time></p>
</header>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque id ipsum sit amet nunc venenatis finibus at tincidunt mauris.</p>

Try this code ❯

Meaning

The <header> element represents the header section of a document or a section element it is contained within.

Typical document header in print, it should contain title and heading information about the related content.

Version: HTML5


Standard Syntax

<header>...</header>


Advertisement

Global Attributes

<header> element also supports the Global Attributes in HTML.


Event Attributes

<header> element also supports the Event Attributes in HTML.


By Default CSS Value(s)

Most of the browsers will display the <header> element with the following by default value(s)

header {
  display: block;
}

Related Tags:

<body>,
<nav>,
<article>,
<aside>,
<h1> - <h6>,
<hgroup>,
<footer> and
<section>

❮ Previous: <head> Next: <hr> ❯
Advertisement