The <header>
element is used to organize all the content that goes at the top of a page. Within the <header>
element, you might well include the <nav>
content as shown in the next screenshot.
And, you will probably include standard (traditional) HTML tags such as headings and links.
So, the <nav>
content—the links at the top of a page—are included in the <header>
element when they are placed at the top of a page. Navigation elements placed in sidebars are also enclosed with the <nav>
element, but since—in this case—they are not part of the header, they are not enclosed in the <header>
element.
Within a <header>
element, CSS styles associated with tags (<h1>
, <h2>
, and so on), or with the class <div>
tags can be used to supply additional formatting rules for how content will be displayed.
With the aim of making content within a header more easily categorized, HTML5 includes the <hgroup>
element...