Search code examples
htmlaccessibilityfooter

Screen Readers and multiple "<footer>" elements


I have read that screen readers want to use only 1 time the "footer" element on the page But I have also read that you can use the footer inside "section" element

What is the correct syntax?

Can we use the footer inside the section? Can we use the footer multiple times on a page?


Solution

  • Can we use the footer inside the section? Can we use the footer multiple times on a page?

    Can you? Yes, according to the official html spec.

    Should you? I would try to avoid it. You typically have one main footer and it's rare a page is organized to have multiple footers. However, if you have section elements such as an <article> or <aside> there might be situations where those sections have their own footers.

    <header></header>
    ...
    <main>
      ...
      <article>
        <header></header>
        ...
        <footer></footer>
      </article>
      ...
    </main>
    
    <footer></footer>
    

    Same is true for <header>.