Definition
The <noscript> tag is used to display content when a browser does not support scripts or has scripts disabled.
Example
<noscript>
<p>Please enable JavaScript in your web browser for optimal performance</p>
</noscript>
<p>Hello world!</p>Results with Javascript enabled:
Hello world!
Results with Javascript disabled:
Please enable JavaScript in your web browser for optimal performance
Hello world!
Usage
- Both the opening and closing tags are required.
- The
<noscript>element can be placed in the<head>or<body>. When placed in the<head>the following child elements are permitted:<link>,<style>, and<meta>.
Attributes
The <noscript> element only supports the Global Attributes.
Specification
Browser Support
Desktop
| Chrome | Edge | Firefox | IE | Opera | Safari |
|---|---|---|---|---|---|
| Yes | Yes | Yes | Yes | Yes | Yes |
Mobile
| Android Webview | Chrome Android | Firefox Android | Opera Android | iOS Safari | Samsung Internet |
|---|---|---|---|---|---|
| Yes | Yes | Yes | Yes | Yes | Yes |
