Are noscript tags supposed to be defined for every script tag or only once?

422 Views Asked by At

I was reading up on some basic html in which I read that you can use <noscript> after a <script> to define if the client doesn't support running the script. Should this be redefined for every script tag or does one define every case?

So should I do this:

<script>
</script>
<script>
</script>
<noscript></noscript>

or:

<script>
</script>
<noscript></noscript>
<script>
</script>
<noscript></noscript>
<script>
</script>
<noscript></noscript>
1

There are 1 best solutions below

7
ray On BEST ANSWER

Its only purpose is to display content in browsers that can't run the script. It's up to you to decide whether and where you want to display fallback content. From MDN's docs:

The <noscript> HTML element defines a section of HTML to be inserted if a script type on the page is unsupported or if scripting is currently turned off in the browser.