**`<noscript>`** content is completely ignored by browsers with JavaScript enabled — it only renders in the rare case that scripting is disabled (via browser settings, some corporate/security policies, or certain accessibility tools) or entirely unsupported. It's most commonly used to show a polite message explaining that the site needs JavaScript, or to provide a non-JS fallback like a `<meta http-equiv="refresh">` redirect or a plain `<img>` tracking pixel as a backup for a JS-based analytics snippet.
1Understanding <noscript>
`<noscript>` content is completely ignored by browsers with JavaScript enabled — it only renders in the rare case that scripting is disabled (via browser settings, some corporate/security policies, or certain accessibility tools) or entirely unsupported. It's most commonly used to show a polite message explaining that the site needs JavaScript, or to provide a non-JS fallback like a <meta http-equiv="refresh"> redirect or a plain <img> tracking pixel as a backup for a JS-based analytics snippet.
Don't rely on <noscript> as your accessibility strategy — screen readers generally DO run JavaScript, so JS-disabled scenarios are about browser settings/policy, not assistive technology.
<body>
<div id="app"></div>
<noscript>
<p>This app requires JavaScript to run. Please enable it in your browser settings.</p>
</noscript>
<script src="/app.js"></script>
</body>2Practical Example
Here is a real-world application of <noscript> showing how it is used in production HTML.
<!-- Fallback tracking pixel if a JS analytics snippet can't run -->
<script>
// normally sends an analytics beacon via JS
</script>
<noscript>
<img src="https://analytics.example.com/pixel.gif" alt="" width="1" height="1">
</noscript>3Best Practices
Follow these guidelines when working with <noscript>:
1. Use <noscript> to explain that JavaScript is required, for the rare no-JS visitor
2. Provide a non-JS fallback (like an <img> pixel) for critical tracking inside <noscript>
3. Don't treat <noscript> as a substitute for actual accessibility (ARIA, semantic HTML) — those matter regardless of JS
Tip: Don't rely on <noscript> as your accessibility strategy — screen readers generally DO run JavaScript, so JS-disabled scenarios are about browser settings/policy, not assistive technology.
<body>
<div id="app"></div>
<noscript>
<p>This app requires JavaScript to run. Please enable it in your browser settings.</p>
</noscript>
<script src="/app.js"></script>
</body>