deucalion0
deucalion0

Reputation: 2440

Is there a defined answer to whether hiding an H1 tag will get a site banned by Google?

I have been researching this for a few hours and I feel that I can't decide on what is right or wrong. This was asked before on Stackoverflow, but a couple of years ago so I thought I could ask again. I want to include H1 tags on my pages but hide them, because I have graphic in my banner, but I was taught to use an H1 tag for accessibility reasons.

I discovered that this can be considered SEO spamming and can get a site blacklisted, I do not want this. It was also discovered that using H1 tags can greatly increase the sites SEO when using relative headers.

So I want to use them and hide them, for two reasons, but avoid Google blacklisting my site, is there a standard accepted method to doing this, or will I need to choose between risking blacklisting and helping those with visual disabilities a better user experience?

Thanks in advance for any advice.

Upvotes: 2

Views: 1901

Answers (2)

FelipeAls
FelipeAls

Reputation: 22171

You're not improving accessibility if you hide headings.

If you do so with display: none; or visibility:hidden;, it's as if you never added them in the first place: they won't be read by screen readers and obviously won't be displayed if CSS are enabled.
If you do so with negative text-indent or left absolute positioning, only blind people will read them but not partially-sighted people that don't use any screen reader, and they're way more than blind people (perhaps 10 times).

Upvotes: 2

steveax
steveax

Reputation: 17743

The simplest method is just to include the image with an alt attribute in the h1:

<h1><img src="banner.png" alt="my banner text" /></h1>

And you can be assured that you won't be penalized for that. I have not seen any definitive information that doing image replacement will result in a higher ranking than using alt properly. Like most SEO lore, there is very little data. That said, as long as you are not trying to game the search engines and present something different to the user and the search engine, it's unlikely you'll be penalized for using image replacement.

If you do do image replacement, be sure to position the text off-screen by using absolute positioning or negative margins rather than display: none or visibility: hidden so that screen reader users can access the content.

Upvotes: 2

Related Questions