Search code examples
htmlsemantic-markup

Which HTML5 Tags Should Only Occur Once in a Document?


This is mainly a question about semantic markup. I believe there are some tags which ought to only occur once in an HTML5 document for that document to be considered semantically correct. I believe <nav> is one such tag. I wonder if <h1> also falls into this category. Are there any others? So far this is the list, maybe someone could flush out the list?

  • <nav>
  • <h1>

Solution

  • The only tags that need to be unique on the page are:

    • <html>
    • <head>
      • <title>
    • <body>
      • <main>

    The rest can occur as many times as you want, and it'll still be completely valid, even semantically.