I have a page that uses HTML <template> tags. I don't know the page length like this.

<template>Some Html</template>
<template>Some Html2</template>
<template>Some Html3</template>
<template>Some Html</template>

I render them via JS when they will be visible (using Intersection_Observer).

How does it affect on SEO? Do I need to output the same HTML in the noscript tag for SEO?

  • What types of SEO problems are you worried about? Are you worried about Google (which will execute your JavaScript) or other search engines that won't? Jul 1 at 12:35
  • I am worry because there isn't 100% guarantee that after changing server-side render to client-side, it will not affect to SEO. If you google this question you will find out there is no 100% answer for this question and because I am't SEO specialist I asking help from SEO specialists . Jul 1 at 14:28

1 Answer 1


I render them via js when they will be visible

If you render server-side, this does not matter at all.

If you render client-side, it could affect SEO. Is the "some HTML" part actual HTML? Could a browser display the page without JavaScript-rendering?

  • Hey, I am rendering in the client side. "Could a browser display the page without JavaScript-rendering?" - it depends of question 2(I don't want to use noscript tag because the html size can be very large because I will duplicate the html 1 in template and 1 in noscript). The goal of this is that , when you have a large dom, dom render is slow. that is why I am trying to render a part which is visible. Jul 1 at 14:24
  • @Malte <template> tags are written by the server, but those are invisible on the client side until JavaScript transforms them, so I can see why there could be some concerns with SEO around them. Jul 1 at 14:38
  • They are visible in the client side(template tags contains html with text,images and etc.). Let's say I have this normal html now <div><h1> Lorem Ispum .... </h1></div> now I am just wrapping it with template tag and rendering via js on the client-side when it will be visible(using Intersection_Observer). Does it affect on SEO? <template><div><h1> Lorem Ispum .... </h1></div></template> Jul 1 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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