HTML


The <noscript> element in HTML is used to set content for visitors who have visited your website but have disabled the scripts in the web browser.

Note: The visitors would see the same content set in <noscript> because scripts aren’t enabled in their browser or they have a browser that doesn’t support script.

Let us now see an example to implement the <noscript> tag −

Example

 Live Demo

<!DOCTYPE html>
<html>
<body>
<script>
   document.write("This is it!")
</script>
   <noscript>This text would be visible if your web browser doesn't support JavaScript or you have disabled it in the browser.</noscript>
</body>
</html>

Output

This will produce the following output. Since JavaScript is enabled in our browser, the following would be visible −

Let’s say JavaScript is disabled in the web browser, therefore the following text would be visible. This text was set under the <noscript> tag −

Updated on: 29-Jun-2020
Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements