By using this site you agree to the use of cookies by Brugbart and our partners.

Learn more

HTML Noscript Tag

Reference on the HTML noscript Tag. Including its useful examples, and a list of the allowed attributes.

Edited: 2014-12-28 07:10

The noscript element is used after a script element, in cases where scripting is either turned off, or when the user agent doesn't support the language used. At which point the user agent is to render the content of the noscript element instead.

For example noscript can be used to give your visitors a generic message, telling them to enable scripting in their browser.

Attributes

Standard Attributes

Attribute:Value:Description:DTD:
AttrsOther AttributesCommon, Event, I18nSTF

DTD. Defines which document type the attribute is allowed. S=Strict, T=Transitional, F=Frameset.

Example

<!DOCTYPE html>
<html lang="en-US">

  <head>
    <script type="text/javascript" src="/scripts/MyScript.js">
     /* External JavaScript, do not embed anything here. */
    </script>
  </head>

  <body>
    <script type="text/javascript">
     /* Embedded script */
     document.write('<p>Welcome to our company website!</p>');
    </script>
    <noscript>
      <p>Please just pull yourself together, and enable scripting this instant.</p>
    </noscript>
  </body>

</html>

Brugbart Vision!