3

Posts page has multiple <h1> tags (one for every post). There are almost no <h2> tags on the page.

Do you think it's fine to have multiple <h1> tags if each of those tags have equal importance?

  • 2
    Are you asking in terms of SEO or in terms of semantic correctness? – Stephen Ostermiller Dec 6 '16 at 16:36
  • Is my previous answer doesn't answer your question? For this I will say don't use <h1> tag on different post title as well. For listing post title on specific webpage use h2 tag instead. Theme developer often do mistakes on that. Checkout any SEO experience guy blog for example matt cutts blog, and you will not going to see multiple h1 tag on same page, he is using h2 instead. If you just trying to use h1 tag multiple time for SEO purpose, then I will say you're over optimizing SEO which can hurt sometime. – Goyllo Dec 6 '16 at 16:41
  • 1
    Never never never use more than one H1 tag. There are several reasons for this that I will not get into. I will just say NEVER use more than one h1 tag. Let's keep it that simple. – closetnoc Dec 6 '16 at 16:46
  • 1
1

The answer is no. There should be only one <h1> element on a page. And, interestingly enough, there was an article that came out just today about this as far as use with <section>.

In any case, browsers still treat <h1> as the heading for the whole page.

  • Google stated that it will only look at one h1 tag and take only the first one. If the first h1 tag is junk, then the results will be junk. It may be that Google is evaluating h1 tags if there is more than one h1 now-a-days like it does for duplicate links. However, this is not a safe assumption. It is always better to follow standard convention. Cheers!! – closetnoc Dec 7 '16 at 16:47
  • 1
    "browsers still treat <h1> as the heading for the whole page." - "browsers" or "search engines"? – MrWhite Dec 7 '16 at 23:09
  • 1
    @closetnoc Do you have a reference where "Google stated that it will only look at one h1 tag and take only the first one."? This doesn't sound particularly Google-like to me, considering the carbuncle of invalid markup they must have to deal with. The only relevant reference I can find is a Matt Cutts video from 2009 which appears to debunk this idea. Matt Cutts states, "You can have it [h1] multiple times." – MrWhite Dec 7 '16 at 23:09
  • @w3dk Oh cripes! That was way back in 2008 or so. I would have to search the same as you would. But it sounds very Google like to me considering how important the one tag is. It is the same behavior as multiple links to the same target. Google used to take only the first one found. Of course you can have more than one h1 as far as G is concerned... however... are they going to pay attention to it? BTW- Please don't think G does not use existing and well known open source code and writes all their own purely from scratch. That would be a mistake. – closetnoc Dec 7 '16 at 23:20
  • @w3dk BTW- It occurred to me to clarify my thoughts a bit. It is not that more than one h1 tag is totally ignored. It is not. However, some tags are expected to exist only once. This followed the parser model even though HTML has always been broken down it's DOM model using a well known open source code (at the time). It is a matter of writing code to take the highest order h1 tag or evaluate all h1 tags for what is considered an important semantic signal. I rather suspect that h1 tags are evaluated today just like links, but not originally. No evidence of change, so I stick with original. – closetnoc Dec 7 '16 at 23:50
1

If you have multiple blog posts (whether with full text or just teasers) on a page, each post should get its own article element.

The first heading element (h1-h6) in the article (and not nested in another sectioning content element) will be that article’s heading.

HTML 5.1 allows authors to use h1 all the time, but it recommends that authors use

[…] headings of the appropriate rank for the section’s nesting level.


The following snippets show what is recommended:

<body>

  <article>
    <h2></h2>
    <!-- 
      <h2> because the <article> is on the second level
      (<body> being the first one) 
    -->
  </article>

  <article>
    <h2></h2>
  </article>

</body>
<body>

  <section>

    <article>
      <h3></h3>
      <!-- 
        <h3> because the <article> is on the third level
        (<body> being the first one, <section> being the second one) 
      -->
    </article>

    <article>
      <h3></h3>
    </article>

  </section>

</body>
<body>

  <div>

    <article>
      <h2></h2>
      <!-- 
         <h2> because the <article> is on the second level
         (<body> being the first one);
         as <div> is not a sectioning content element,
         it doesn’t represent a nesting level for the outline  
      -->
    </article>

    <article>
      <h2></h2>
    </article>

  </div>

</body>

But in those three examples, it would be valid to use h1 (or any other heading element) instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.