Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Does having empty H2 container tags on a page hurt SEO?

         

Nosuchthing

4:11 pm on Feb 8, 2021 (gmt 0)

5+ Year Member Top Contributors Of The Month



Hello,

While auditing a website, I realized that there are many empty H2 containers on most the pages.

This is not really something that the users can see, but it appears quite obvious using an extension. I am wondering how much of an effect this can have on rankings?

To clarify, this issue seems to originate from the CMS. When publishing an article, if the user places an H2 on a sentence, then click enter to create a space, the H2 tag is carried over to the line below, even though it is an empty space.

It can fixed quite easily, but I would like to know how much of a priority this is, since this will take quite some time.

Since the question is mostly about SEO, I chose to post it here, not sure if I should have posted in the HTML section instead.

Thanks in advance,

Wilburforce

8:48 pm on Feb 8, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



H2 is of semantic importance to SEs (but also to readers, if used correctly), and a page that is not correctly structured will never rank as well as one that is.

From any SE's or user's perspective, having a heading that describes the subject of each section is useful.

If all - or at least most - of the empty H2s are the same (e.g. <h2></h2> or <h2> </h2), it should take seconds to delete all of them, which is better than leaving them as they are. If you want to put a relevant heading in each of them - the best longer-term policy for users and SEs - then yes, it will take quite some time.

phranque

8:54 pm on Feb 8, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



assuming the header element isn't empty due to missing content, i would think the only issue would be possible issues with understanding the semantics if there were subheaders under the null element.
there is also the slight issue of code bloat in general, which is essentially what null elements are.

in other words empty H2 elements probably won't hurt SEO unless there are a LOT of them or they are an essential part of the document's semantic structure.

not2easy

3:27 am on Feb 9, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



To clarify, this issue seems to originate from the CMS.
You mention it is coming from the CMS - does this CMS use a database? So you may be able to edit the database to deal with it?

I agree with Wilburforce here:
If all - or at least most - of the empty H2s are the same (e.g. <h2></h2> or <h2> </h2), it should take seconds to delete all of them, which is better than leaving them as they are. If you want to put a relevant heading in each of them - the best longer-term policy for users and SEs - then yes, it will take quite some time.

Nosuchthing

11:03 am on Feb 9, 2021 (gmt 0)

5+ Year Member Top Contributors Of The Month



@Wilburforce, the pages are correctly structured except for that.
@phranque, that is actually what it is, empty because of missing content. It's just empty paragraphs tagged as H2s.
@not2easy, I am not able to do that myself, I'll see with the devs if this is something they can do, that would indeed be quite the time saver.

lucy24

5:28 pm on Feb 9, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Turn it around: Do empty <h2> tags help SEO? This is, of course, so wildly improbable that you can proceed directly to:

The site has messy html involving, among other things, empty <h2> tags. Messy html is inherently undesirable, so clean it up.

Wilburforce

8:16 pm on Feb 9, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



@Nosuchthing - Sorry, what I meant - perhaps not clearly enough - was "Search engines use the headings to index the structure and content of your web pages" (w3schools.com), and (^^) "Messy html is inherently undesirable, so clean it up".

In that sense, as well as <h2> (and, presumably, <h1>), do you mean your pages also use <h3> to <h6>?

[edited by: phranque at 10:45 pm (utc) on Feb 9, 2021]
[edit reason] disable graphic smile faces [/edit]

Nosuchthing

3:19 pm on Feb 10, 2021 (gmt 0)

5+ Year Member Top Contributors Of The Month



I am aware that they would not help. I phrased it wrong I guess, it was more about evaluating how much of a priority fix it was. It will indeed be easy to fix using the database, so thanks a lot for this advice!

@Wilburforce I meant that apart from this issue, the pages already have a logical use of descriptive headings (<h1> through <h4> mostly, depending on the need for it.) The issue mainly presented itself when it comes to <h2>s, but I understand how it could be confusing I would only mention these and not any other.