Let’s play with it. So I would have a special word right below this section. The word is going to be in a span with a display:none. So, technically, it won’t be rendered by the browser. But would Google index it?
Why would it matter?
SEOs want to have their H1s on pages. Often business won’t let us do that as SEO headers can affect the aesthetics of the page. Generally, in these cases SEOs would either go with display:none or use an image with an alt and a title as a header.
Using an image in a header goes against the html syntax, so let’s test the display:none
So here’s our container:
Ok, let’s wait till this page gets indexed and see what happens.
Experiment is in progress.
Let’s check the results.
Wonderful. Looks like not only G indexed the hidden text, it used it in the snippet. Hence, yes, we can use display:none to hide elements that are vital for G, but not-so-desirable from the UX/UI perspective.
Google indexes and ranks display:none content
Although there are no automated cloaking algorithms, it will be identified as cloaking in case you abuse it. 🙂