Welcome to the Treehouse Community
Looking to learn something new?
Lorenzo Pieri19,772 Points
Text-Indent trick and SEO
So, about the video PART 1 showing the Text-Indent set to -20k px:
How does google see this? Is it some kind of trick that will be negatively valued by the algorithm? Are we going to get a negative vote from the search engines if we use that trick to implement the LOGO feature but still think about accessibility?
Thanks for the answer!
I was curious about this too. Google's quality guidelines for hidden text and links seem to indicate that Google considers this deceptive (see the third bullet point). I think the best practice might be to use an image tag in your h1 tag, and use the alt attribute for your text.
To my knowledge google doesn't look at the css. Search engines are going to scan the html file and see the text in the
h1 as part of the content. Same for screen reader users. They will hear the text in the
The negative text indent is purely for visual users. The text is moved out of the way so they don't see it and they see the logo instead. What the logo graphic looks like and what font it uses is really only important for visual users.
So visual users get the logo image, search engines and screen reader users get the text.
Andrew Biviano6,748 Points
Google is unlikely to consider this 'hidden text' and even less likely to give you a penalty. Hidden text in SEO is referring to adding keywords that are the same color as the background, meaning you'd only see them if you highlighted the area. It's incredibly old-school I haven't seen it on a site in ~8 years.
source: adding front end skills after doing SEO for 10 years