This website uses cookies

We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you've provided to them or that they've collected from your use of their services. Please read more at our privacy policy page.



HTML <noscript> Tag

The <noscript> tag has an alternative content, which is displayed in the browsers, that don’t support scripts, or the browsers, where the script support is disabled by the user. In other cases, the browser ignores this tag and its content.

In HTML5 the <noscript> tag can be placed in the <head> and <body> elements. In HTML4 it can be used only in the <body> element. If the <noscript> is placed in the <head> tag, it must contain only the <link>, <style> and <meta> tags.

Syntax

The <noscript> tag comes in pairs; the closing tag is required.

Example

<!DOCTYPE html>
<html>
  <head>
    <title>Title of the document</title>
  </head>
  <body>
    <script>
      document.write("My first code in JavaScript!")
    </script>
    <noscript>Sorry, your Browser doesn’t support JavaScript!</noscript>
  </body>
</html>

Result

Attributes

The <noscript> tag supports the Global Attributes and the Event Attributes.

Browser support