Reputation: 356
If I use CSS to hide page x of a multiple page article using 'display: none;' and then jQuery/javascript to display it onclick, will search bots ignore the content previously hidden in the other pages or include it?
Shortened Example:
<div id="displayed_page">
[page 1 is here first], [page 2 onclick], [etc...]
</div>
<div id="page1" style="display: none;">
first part of content that needs to be indexed
<button id="clicker" onclick="nextpage();">click me</button>
</div>
<div id="page2" style="display: none;">
second part of content that also needs to be indexed
<button id="clicker" onclick="nextpage();">click me</button>
</div>
<div id="page3" style="display: none;">
third part, et cetera...
<button id="clicker" onclick="nextpage();">click me</button>
</div>
Please don't point me to google webmaster tools, I've been there. Nor am I trying to be deceptive in any way. Basically, I made a pagination plugin for Wordpress and I want the hidden content to be indexed. Will it?
Upvotes: 1
Views: 335
Reputation: 96687
There are various search bots and all behave differently.
So let's ask the question: Would it be useful for search engine users to land on your page for a keyword that is not visible? I don't think so. Good search engines won't deliver your page as result when they can't link to the page (or in your case, section) where the relevant content is contained.
So there are two variants:
I have no idea why you implement such a pagination feature, but I'll assume that you have your reasons. So regarding the second variant:
You set display:none;
initially, and offer a JavaScript navigation to un-hide it. If a (CSS parsing) search engine bot or a user without activated JS visit your page, they don't see the whole content and they have no chance to get to the other sections.
So instead you should initially have all sections visible, and only if the visitor has JS activated, hide the other sections and offer a JS navigation to display them.
Upvotes: 0
Reputation: 3118
Search Engine bot will read everything which your HTML web page has, but that content will not be used for your page ranking.
but if you are trying to hide your content from users like using same color to the font as page background then they may remove your website from indexing as users are not getting proper content.
Upvotes: 0
Reputation: 103388
Yes, bots don't look at web pages, they read the source code.
The fact you have applied a CSS property to a particular element will make no difference to the bot.
The only instance where Google for example, would penalise for hidden content, is when the content has been added purely to help boost rankings:
http://support.google.com/webmasters/bin/answer.py?hl=en&answer=66353
Before search engines wised up to this, some web designers would add a load of comma-delimited keywords hidden at the bottom of their page so that bots would read it, and assume it was relevant content.
Upvotes: 2