I have a set of thumbnails and whenever a user clicks a thumbnail I’d like to show a corresponding descriptive text.
I was planning to do it with one div that its innerhtml will change according to the onclicked thumbnail (with javascript). Will all the descriptive text be invisible to robots (seo-wise)?
Any better idea how to implement it?
For SEO, it is simplest if all text you want the search engine to see is in your actual HTML markup. Rather than change the innerHTML on one div, you might put multiple divs next to each other and just hide/show the right ones. Then all text will be in the markup.
Thumbnail descriptions also belong in the
altattribute on the image and search engines look for them there. I don’t know exactly how your app works to know if that’s sufficient, but you may at least want to also put the descriptive text there.