Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Hiding stuff can be cloaking if it's made for make the page rank higher. However here is a question about hiding content, not for higher ranking but for the user.

Question

  • Hiding content with CSS and showing it with JS is dangerous (because Google don't read JS well)?
  • Hiding content with JS and showing it with JS is safer?
  • Hiding content is ok if it can be visible again by user no matter technique?

A source that support your answer would be nice.

share|improve this question
    
Is your question about SEO or accessibility? You mention SEO and Google but state this is a question "for the user, not for ranking"? –  w3d Apr 5 '13 at 12:04
add comment

2 Answers 2

Google expects that when a user searches for a phrase and then clicks on your site, the user will be able to find the text that the user searched for. That means that any text that has keywords in it should be shown to all users without requiring interaction on the page.

In addition to incurring a specific penalty assessed by Google if they detect "hidden text", users tend to back out of your site when they don't find what they are looking for. Your rankings will fall drastically for any query where users bounce back to Google and look for something else. Google measures the "return to SERPs" and will de-rank pages that don't do well on this metric for a search term.

That being said, there is no absolute ban on hiding content using CSS or Javascript that the user can then later expose through an action. Some common examples of this are:

  • Drop down menus: hidden menu text by default, but exposed on mouse-over
  • Tool tips: exposed when a user mouses over an element
  • Tabs: exposed when user clicks on the tab

These techniques are generally fine with Google, regardless of the specific technique used to initially hide the text. Just be careful not to put keyword rich text into anything that is initially hidden.

share|improve this answer
add comment

because Google don't read JS well

Google reads JS very well. http://www.youtube.com/watch?v=LW3pjQeCqqk - in this video Matt Cutts said about JS crawling.

It doesn't matter (how you hide the content) if you hide it with no intention to manipulate site search metrics and to deceive crawler. You may use either CSS or JS.

share|improve this answer
2  
Google reads JS, but whether it fully understands it and indexes the generated content is another matter - which I think is what the OP is referring to. –  w3d Apr 5 '13 at 12:06
2  
You also need to bear in mind that if Google reads a hidden DIV and finds it contains a huge amount of SEO focussed keywords it might react differently than if it simply found text which was naturally relevant to the surrounding text. –  joesk Apr 5 '13 at 12:40
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.