Use noscript Element to provide alternate content for browsers without JavaScript

Description

noscript element provides alternate content for browsers without JavaScript.

This element can contain any HTML elements. Content in a noscript will be displayed under the following two circumstances:

  • The browser doesn't support scripting.
  • The browser's scripting support is turned off.

Example

Here is a simple example:


<!DOCTYPE html>
<html>
  <head>
    <script src="example1.js"></script>
  </head>
  <body>
    <noscript>
      <p>This page requires a JavaScript-enabled browser.</p>
    </noscript>
  </body>
</html>

In this example, a message is displayed user when the scripting is not available.





















Home »
  Javascript »
    Javascript Introduction »




Script Element
Syntax
Data Type
Operator
Statement
Array
Primitive Wrapper Types
Function
Object-Oriented
Date
DOM
JSON
Regular Expressions