During a hangout one SEO professional asked John Mueller about H1 heading tags.
More specifically, they wondered if adding a span or class attribute into an H1 heading tag would affect their website from an SEO perspective?
John explained that he doesn’t think so. His understanding is that Google would still see that as a heading.
So long as it’s a valid heading, they will be able to use that.
He doesn’t know, from a technical valid-HTML perspective, whether that’s the correct way to code a heading.
But from Google’s perspective, they would likely see that just as a heading.
The SEO pro then asked if it’s a problem for them to make an animation for their H1 heading, if they use the span class, because they saw their site go down in the rankings for some reason.
They don’t know whether it’s perhaps better to have clean H1 headings without anything inside of them?
John said that he does not imagine that a website would drop in its visibility just because of that change to a heading tag.
This happens at approximately the 26:01 mark in the video.