Can our website used the trick: putting all SEO data in some tag, but rendering all the web page elements with JavaScript? How would that work for SEO?

May be like:

 <a href="/about">Link to about</a>
 <a href="/smth">Link to smth</a>
 <a href="/posts">Link to posts</a>
 <h1> This is a Page about SMTH </h1>
 <arictle> Block, with contains info about this Page. And other Bla Bla Bla. </article>
 And etc.

2 Answers 2


Why is there some initial text in tags? If it's there for SEO reasons, then this is hidden text and definitely a bad idea for SEO.

To answer your JS question, it's fine to dynamically populate your page text with javascript. (Google spiders with Chrome, and executes JS).

The issue is really the pre-existing text and why it's there. Does it differ from the text you're adding with JS? Is it keyword rich?


Yes, Google has stated that they try to crawl the pages like a typical browser, that means by also running javascript and css. Of course, there are some things you have to keep in mind but you can definitely do it.

  • 1
    Since Googlebot runs the JS and CSS that means that Google will just ignore the static text. So there doesn't seem to be any point to having it for Google and it might just get the site penalized for cloaking. Jan 29, 2019 at 15:04
  • @StephenOstermiller can you elaborate on that? Or provide some sources? First of all, why would googlebot ignore the static text "since it runs the js and css"? What do you mean by that? And secondly, why would they get penalized for cloaking if they show the same content to both bots and humans users?
    – Prinny
    Jan 29, 2019 at 20:09
  • 1
    It sounds to me like they are replacing the text contents of that tag using js. If it is exactly the same content that could be ok but if it different at all that would be cloaking. Jan 29, 2019 at 20:19
  • @StephenOstermiller yes the question is a bit vague. If it is different text every time it is indeed cloaking. My initial understanding is they render the same thing always.
    – Prinny
    Jan 29, 2019 at 20:22
  • It would also be cloaking if the static text were different than the dynamically rendered text in any way. Jan 29, 2019 at 21:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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