#1 Data Analytics Program in India
₹2,499₹1,499Enroll Now
3 min read
•Question 47 of 49easy

What is the Noscript Element?

Fallback for no JavaScript.

What You'll Learn

  • Using the noscript element
  • Fallback content
  • Head vs body usage

The Noscript Element

The <noscript> element provides fallback content when JavaScript is disabled or unavailable.

Examples

index.htmlHTML
<!-- Simple message -->
<noscript>
  <p>Please enable JavaScript to use this website.</p>
</noscript>

<!-- Alternative content -->
<noscript>
  <a href="/static-version">View static version</a>
</noscript>

<!-- In head (limited to link, style, meta) -->
<head>
  <noscript>
    <style>
      .js-only { display: none; }
    </style>
  </noscript>
</head>

Use Cases

  • Message to enable JavaScript
  • Non-JS alternatives
  • Static content for bots