There's a lot of debate over the architecture of heading structure in html5. After reading various articles, I've come to three possible architectures that make logical sense to me, but I'm unsure which is the actual proper method of approach. I'll list them below with code examples and hopefully someone can shed some light on the proper balance, or worse/better yet, say the dreaded "You're doing it wrong" and lend a hand.
Approach 1: Version A
Single <h1>
: Using headings for page specific content only.
This leaves the <h1>
as the top-level navigation for the page specific heading while flowing <h2-6>
as needed within the content area. While leaving the <header>
, <nav>
, and <footer>
as "untitled" elements.
<header>
<nav>
<!-- no headings -->
<div role="main">
<h1>
<section>
<h2>
<section>
<h3>
<footer>
<!-- no headings -->
Approach 1: Version 2
Multiple <h1>
's: Only using headings for page specific content only.
Same as 1A with the addition of multiple, equally important, page content topics. (e.g. possible for blogs or split topic pages)
<header>
<nav>
<!-- no headings -->
<div role="main">
<h1>
<article>
<h2>
<article>
<h1>
<footer>
<!-- no headings -->
Approach 1 Outline: Most logical for SEO (my opinion from my research)
- Untitled BODY
- Untitled NAV
- main heading
- Section Heading
- Subsection Heading
- Untitled SECTION
Approach 2:
Multiple <h1>
's: Emphasize outline structure AND content hierarchy
This applies headings to the site-wide elements <header>
, <nav>
, and <footer>
using multiple <h1>
's for non-content oriented elements.
<header>
<h1>
<nav>
<h2>
<div role="main">
<h1>
<section>
<h2>
<section>
<h3>
<footer>
<h1>
<section>
<h2>
Approach 2 Outline: Most logical for semantic outline (again, my opinion)
- Header Heading
- Navigation Heading
- main heading
- Section Heading
- Subsection Heading
- Footer Heading
- Section Heading
Approach 3
Single <h1>
: Content hierarchy focus; lower level <h1-6>
for site-wide elements
This applies headings to the site-wide elements <header>
, <nav>
, and <footer>
WITHOUT using multiple <h1>
's for non-content oriented elements.
<header>
<h2>
<nav>
<h3>
<div role="main">
<h1>
<section>
<h2>
<section>
<h3>
<footer>
<h2>
<section>
<h3>
Approach 3 Outline: kinda a hybrid of both approaches
- Header Heading
- Navigation Heading
- main heading
- Section Heading
- Subsection Heading
- Footer Heading
- Section Heading
So with all that said, how do I make sense of all this? Does any one approach carry more semantic value than the other? Does one make more sense in terms of SEO? Is there a happy balance that can be achieved?
Sources: There were many more, these are those I can remember at the moment