HTML <header> tag

Definitie en gebruik

<header> Elementen vertegenwoordigen een container voor inleidend materiaal of een groep navigatielinks.

<header> Elementen bevatten meestal:

  • Een of meerdere titel-elementen (<h1> - <h6>)
  • Logo of icoon
  • Auteursinformatie

Tip:<header> Tags worden vaak gebruikt om de hoofding van een document te definiëren.

Opmerking:Een HTML-document kan meerdere <header> element. Maar,<header> Kan niet worden geplaatst <footer>,<address> of een andere <header> in het element.

Zie ook:

HTML DOM referentiehandleiding:Header object

Example

Example 1

The title of <article>:

<article>
  <header>
    <h1>This is the title</h1>
    <p>Published by Bill Gates</p>
    <p>Here is some additional information.</p>
  </header>
  <p>Here is the main content.... Here is the main content....</p>
</article>

Try it yourself

Example 2

Page header:

<header>
  <h1>This is the homepage title</h1>
  <p>Published by Bill Gates</p>
</header>

Try it yourself

Global attributes

<header> The tag also supports Global attributes in HTML.

event attributes

<header> The tag also supports Event attributes in HTML.

Default CSS settings

Most browsers will display the following default values <header> Element:

header {
  display: block;
}

Browser support

The numbers in the table indicate the first browser version to fully support this tag.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
5.0 9.0 4.0 5.0 11.1