What wrapper should I use, <header>
? I'm used to <div>
, but I want a modern markup if reasonable. Based on the spec quote below, it seems like a good choice. Is it?
The header element represents a group of introductory or navigational aids.
What wrapper should I use, <header>
? I'm used to <div>
, but I want a modern markup if reasonable. Based on the spec quote below, it seems like a good choice. Is it?
The header element represents a group of introductory or navigational aids.
Yes, you can use a header
element for these parts.
The spec notes that it can be used for "any relevant logos" and the last examples shows that the header
contains the navigation (which a language switcher and a hamburger button typically are).
You could also use multiple header
elements, e.g., if there’s something between these parts that should not be part of the header
.