HTML <header> Tag

❮ Previous Reference Next ❯

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>

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>



Browser Support




Status







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 Reference Next ❯