WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Can H2s be stacked?

for

From: S
Date: Jan 29, 2024 12:35PM


As a general rule, it is acceptable to have H2 following each other when
they are titles of unique sections of content and not a
subsection/breakout of another section.  For example, if the page is
titled Ways to Travel, then it is logical to have consecutive H2 titles
for Planes, Trains, and Automobiles.

However, in your example, three of your H2s - Shops on Main Street,
Farmers Markets, Other Shops - appear to be subsections of the higher
level concept of Explore Shopping.  If those are three different ways to
"explore shopping", then Explore Shopping is the H2 and the other three
are H3 under Explore Shopping.


> Hello everyone,
>
> I’m writing to check/confirm that it is ok to stack H2 headers. I am interested in your feedback and clarifications!
>
> The section of content is this:
>
> <h2>Explore Shopping</h2>
> <h2>Shops on Main Street</h2>
> <p>content</p>
> <h2>Farmers Markets</h2>
> <p>content</p>
> <h2>Other Shops</h2>
> <p>content</p>
>
> I believe this structure is ok, but I would feel better about it if I had confirmation.
>
> I look forward to hearing back and thank you for your advice!!
>
> Jo
>
>