How do I organize a page into header, navigation, main, and footer regions?
Quick answer
Use <header> for introductory content, <nav> for a group of navigation links, <main> for the page’s primary content, and <footer> for footer content. Choose each element because of what its content does, not how it looks. A header or footer can belong to the whole page or to a particular article or section, so check which content it introduces or closes. [S1]
The question, the details, the next step.
A practical checklist
Mark the page’s primary content as the main region.
Use navigation for groups of links intended to move around the site or page.
Decide whether each introduction belongs to the whole page or a particular section.
Decide whether each footer belongs to the whole page or a particular section.
Check that each element reflects content purpose rather than visual styling.
A few more useful answers
Does a header always mean the top banner of a page?
No. A header can introduce the whole page or belong to an article or section. Choose its scope by what it introduces, not where it appears visually. [S1]
Is every set of links navigation?
Use <nav> for links serving a navigation purpose, such as links to site areas or page sections. The element describes that purpose, not merely the fact that text is linked. [S1]
Can an article have its own header and footer?
Yes. Header and footer elements can describe content belonging to an article or section as well as content for the page overall. [S1]
Sources
References used for this guide.
- [S1] Structuring documents with semantic page regions developer.mozilla.org · Checked
