In this article, we have explained the concept of noscript tag in HTML and how and when it is used in a webpage.
Table of Contents:
- What is noscript
- Use of the noscript Tag
- HTML + noscript
What is noscript
To first understand what is the
<noscript> in Html we must first understand what is the
<script>. In simple terms the
With this in mind we can say that
<noscript> does the exact opposite. It renders content for browsers that dont have scripts supported(which is very rare or non-exsistant in this current time)or for clients that have scripts disabled.
Use of the noscript Tag
As stated in the previous chapter the
In this example, the sentence between the noscript tags will be shown once the user has scripts turned off or thier browser doesn't support scripts, the String betwwen the script tags won't be shown in this case.
HTML + noscript
<noscript> can be used in HTML5 in either the
<body></body> elements, when placed in the
<head></head> element it can only contain the
<style> tags. The
<noscript> can also be used with HTML4 but in this case it can only be used within the
<body></body>. Dont forget to use a closing tag with noscript
<noscript> <p>This is noscript Syntax</p> </noscript>
As you can see the
So in your next project remember to add
<noscript> you just might help someone that is missing out on the fully interactive experience of your website.