Forum Moderators: phranque

Message Too Old, No Replies

display:none, javascript, content, and seo

         

natecw

4:05 am on Aug 25, 2009 (gmt 0)

10+ Year Member



This is my first post here, hi everyone. :)

A site I am working on has this "sub-site" section, the sort of thing where you'd use an iframe if not for SEO. I was able to get it to work using javascript. There are multiple divs with relevant content. There is a menu with anchor tags which use onclick and javascript functions to show one div and hide the others by making display "none" or "block". Functionally, it works perfectly.

My questions are related to seo: Will search engines read the content in the hidden divs? Will the site be penalized for "hiding" content? A big reason for adding this section is to help with seo. If it's not going to get "read" I need to figure out some other way.

On a related note, am I right in assuming it's not a good idea to have all this content on every page in the site? It would be more effective on just the home page, correct?

Sorry for the long post. :)

Edit:
I just realized I can have the css default be display:block and use body onload to set the display to none, so having javascript off is not a problem.

rocknbil

6:38 pm on Aug 25, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard natecw,

...Will search engines read the content in the hidden divs?

SE's read web page source code from top down, they pay no attention to css classes or styles, so yes. For a while, it will even help you.

Will the site be penalized for "hiding" content?

Eventually, very likely, I have seen this in action. On manual review, or report from a competitor, hidden text or any other "stupid web tricks" will get the page in question de-indexed.

Not that the reasons for hiding divs is always a stupid web trick, but when done to get keywords on a page without actually showing them to the viewer, it is, and is considered such by the S.E.'s.

On a related note, am I right in assuming it's not a good idea to have all this content on every page in the site? It would be more effective on just the home page, correct?

By "all this content" I hope you don't mean a mix of various keywords, or "all topics" for this site. Remember that web sites don't index in search engines, web PAGES do. So if you have a page for green widgets and a page for red widgets, you want the page for green widgets to index for green widget searches and the page for red widgets to index for red widget searches. You really shouldn't care if your home page indexes for red or green widgets - in fact, if it did, you just put yourself in competition with yourself, the home page is now competing against the other two. Get it?

So keep your pages specific and topical - yes, I know, your home page is the "start page" for buying red and green widgets. But it should optimize for buy widget,s widget information, using widgets . . . anything but red and green widgets.

This is a simplistic description of the issue but hopefully demonstrates the point . . .

natecw

8:13 pm on Aug 25, 2009 (gmt 0)

10+ Year Member



mm...ok. Thanks, that's very helpful.