HTML <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.

  • Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
    • Includes 34 Courses
    • With Professional Certification
    • Beginner Friendly.
      115 hours
  • Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.
    • Beginner Friendly.
      7 hours

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

  • Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
    • Includes 34 Courses
    • With Professional Certification
    • Beginner Friendly.
      115 hours
  • Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.
    • Beginner Friendly.
      7 hours