1

Possible Duplicate:
How bad is it to use display: none in CSS?

We've established on this site before (in this question) that, since there are so many legitimate uses for hiding content with display: none; when creating interactive features, that sites aren't automatically penalised for content that is hidden this way (so long as it doesn't look algorithmically spammy).

Google's Webmaster guidelines also make clear that a good practice when using content that is initially legitimately hidden for interactivity purposes is to also include the same content in a <noscript> tag, and Google recommend that if you design and code for users including users with screen readers or javascript disabled, then 9 times out of 10 good relevant search rankings will follow (though their specific advice seems more written for cases where javascript writes new content to the page).

JavaScript: Place the same content from the JavaScript in a tag. If you use this method, ensure the contents are exactly the same as what’s contained in the JavaScript, and that this content is shown to visitors who do not have JavaScript enabled in their browser.

So, best practice seems pretty clear.

What I can't find out is, however, the simple factual matter of whether hidden content is indexed by search engines (but with potential penalties if it looks 'spammy'), or, whether it is ignored, or, whether it is indexed but with a lower weighting (like <noscript> content is, apparently).

(for bonus points it would be great to know if this varies or is consistent between display: none;, visibility: hidden;, etc, but that isn't crucial).


This is different to the other questions on display:none; and SEO - those are about good and bad practice and the answers are discussions of good and bad practice, I'm interested simply in the factual 'Yes or no' question of whether search engines index, or ignore, content that is in display: none; - something those other questions' answers aren't totally clear on. One other question has an answer, "Yes", supported by a link to an article that doesn't really clear things up: it establishes that search engines can spot that text is hidden, it discusses (again) whether hidden text causes sites to be marked as spam, and ultimately concludes that in mid 2011, Google's policy on hidden text was evolving, and that they hadn't at that time started automatically penalising display:none; or marking it as spam. It's clear that display: none; isn't always spam and isn't always treated as spam (many Google sites use it...): but this doesn't clear up how, or if, it is indexed.

What I will do will be to follow the guidelines and make sure that all the content that is initially hidden which regular users can explore using javascript-driven interactivity is also structured in way that noscript/screenreader users can use. So I'm not interested in best practice, opinions etc because best practice seems to be really clear: accessibility best practices boosts SEO. But I'd like to know what exactly will happen: whether any display: none; content I have alongside <noscript> or otherwise accessibility-optimised content will be be ignored, or indexed again, or picked up to compare against the <noscript> content but not indexed... etc.

7
  • @Anagio You didn't read the question, did you? I link to that very same question in the OPENING LINE as background research, and I explain the difference between my question and that one, and why that and other questions don't answer mine, in detail in paragraph 4. Commented Oct 22, 2012 at 10:16
  • For anyone else who likes to close questions without reading them, copied and pasted: "This is different to the other questions on display:none; and SEO - those are about good and bad practice and the answers are discussions of good and bad practice, I'm interested simply in the factual 'Yes or no' question of whether search engines index, or ignore, content that is in display: none; - something those other questions' answers aren't totally clear on... It's clear that display: none; isn't always spam and isn't always treated as spam... but this doesn't clear up how, or if, it is indexed." Commented Oct 22, 2012 at 10:18
  • I'm sorry, but how is this different?
    – Anagio
    Commented Oct 22, 2012 at 10:19
  • 1
    I believe i've answered your question
    – Anagio
    Commented Oct 22, 2012 at 10:23
  • 1
    Well be sure to have as little content as possible on the pages with hidden content to rule out what caused it. Then also test serious semantic differences in content as well as content which is very relevant yet hidden to see if they'll take it over other content on the site.
    – Anagio
    Commented Oct 22, 2012 at 10:35

1 Answer 1

6

Yes Google does index content in hidden div tags see the test results here

http://tomaltman.com/does-the-google-bot-index-css-hidden-divs/

I have hidden a secret word in a div which I hid via the css style="display:none" on the home page... The Google Bot did index the information in the hidden div.

(September 28, 2011)

2

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