<noscript>

garanews's avatar
Published Jun 5, 2022Updated Oct 31, 2022
Contribute to Docs

The <noscript> element displays its contents whenever JavaScript is disabled on the browser.

Syntax

<noscript>
  <!-- What should display if JavaScript is not enabled or supported. -->
</noscript>

The <noscript> element has no attributes and what is nested within the tag will be displayed.

Example

In the example below, if JavaScript isn’t enabled, the <script> element will not work and the content inside the <noscript> element will render:

<script src="someScript.js"></script>
<noscript>
<p>
Please enable JavaScript for this page to load. Learn how to
<a href="https://support.google.com/adsense/answer/12654?hl=en">here</a>
</p>
</noscript>

The output might look like this if JavaScript is disabled or not available:

Output of the example

All contributors

Contribute to Docs

Learn HTML on Codecademy