Wrong email or password! Try one more time.

Forgot password?

An account with this email already exists.

An email with a confirmation link has been sent to you.

Did you forget your password? Don't panic. Enter your email address,
and we will email you a link where you may create a new password.

If this address exists, we will send you an email with further instructions.

Back to authentication

What are the ways to hide text?

What are the ways to hide text? - answered by Matt Cutts

Matt's answer:

CUTTS: We had one fun question at PubCon where people sort of asked about what are, you know, what are the different ways to hide text and what should and–should I and shouldn’t I do? And I want to show you a couple of slides about how you should not do it. This is an example of hidden text that we recently came across and it’s almost like a brain teaser. So I’ll show you the first slide, cstring=equals newresourceextranoted, cdisplay=, and then they pieced together a whole bunch of substrings of cstring. And then you can see getElementById style display=cdisplay. Now, what is this even doing? You know, what does this code do when a browser executes it? I’ll let you think about it for just a second. Okay. Are you ready? Let’s go to the next slide and highlight what are the substrings that are actually pulled out of that top string, it’s “n, n, o, e.” And in fact, if you look at the ordering which it’s pulled out, it’s really “n, o, n, e,” none. So what’s really happening here is someone’s taking a string and they’re pulling out the individual characters that correspond to none and then they say, “Okay. Now, this none set the style display,” so CSSY set the display to none. So it’s a very sneaky way of hiding some text using code. Now, we caught this because we can parse some code and we can execute some JavaScript and we can really interpret what the page is doing in a lot of situations. So, my advice is not to use this as a method to hide your code because this looks as suspicious as it can possibly get. Whenever we see someone doing something like this, we pretty much know they’re trying to hide text and they’re trying to do it in such way that people don’t know that they’re hiding the text. So, this is definitely not something that I would recommend. If possible try to make the text visible to users, visible to Googlebot. If it’s good text, why not show it to everybody. Don’t try to do really sneaky tricks to hide it so that, “Oh, they won’t be able to find it this way,” because that really sets yourself up in opposition to users. You’re trying to deceive your users. You’re trying to deceive search engines. And that’s a sort of stuff that can get your site penalized in the long term.


by Matt Cutts - Google's Head of Search Quality Team

 

Original video: