A user recently came across some uniquely-named CSS content, and asked Google if that mattered. Google’s response, as expected, is that it’s ignored.
You can read more over on this post from Search Engine Roundtable.
Subscribe! You can subscribe to this podcast on Apple Podcasts, Anchor, Google Podcasts, Spotify, Breaker, Pocket Casts, RadioPublic, Stitcher, Overcast, and a variety of other places. Be sure to rate the podcast wherever you choose to listen!
So this was a unique, though misguided, idea from an aspiring SEO. While building out a site, they stuffed a bunch of keywords in their CSS. If you’re not familiar, CSS is used to help style websites; you might have things in there such as “header-border” or “footer-color” or other names that help you (the developer) identify areas of the site, but this particular site had one called “fire-risk-assessment”. When asked how they handle this kind of thing, Google’s John Mueller responded with: “We ignore that. Use CSS IDs and class names however you want. I’m pretty sure this never had any effect on any search engine.”
It makes sense. With few (logical) exceptions, the items that matter to Google are things that you can see on the site. They’ve literally never cared about meta keywords, and this falls into a similar kind of category of “keywords that users can’t see, so why would they matter?”.
Over in a post about this on Search Engine Rountable, a user named Marston Gould added a comment to take it further by saying:
“It would be pretty silly for Google to make use of any class names for anything. That would put a serious set of overthinking on how developers develop. No reason to get in the way of that. CSS is hard enough to do well without the added burden.”
Well said. In general, just assume that any text you add that doesn’t appear prominently on your site for visitors to see will be ignored by Google.