📝 JavaScript Disabled? Show a Message.
Some users disable JavaScript. Noscript tag shows content when JS is off. Essential for accessibility, fallback.
📝 Basic Noscript
<noscript>
<div style="padding: 20px; background: #ffeb3b; color: #333;">
<p>JavaScript is disabled. Some features may not work.</p>
<p>Please enable JavaScript for the full experience.</p>
</div>
</noscript>
<!-- Fallback content -->
<noscript>
<img src="static-map.jpg" alt="Map">
<p>Please enable JavaScript to view the interactive map.</p>
</noscript>
<!-- Form fallback -->
<noscript>
<p>JavaScript required for form validation. Please enable JS or use the static form.</p>
<input type="submit" value="Submit (without JS)">
</noscript>
🎯 Use Cases
- Interactive maps (Google Maps fallback) - Forms (validation fallback) - Dynamic content (static version) - Analytics (tracking fallback) - Video embeds (poster image fallback) Progressive enhancement: 1. Basic HTML works without JS 2. JS enhances experience 3. Noscript shows fallback
💡 Accessibility
- Some users disable JS (privacy, security)
- Screen readers may not support JS
- Progressive enhancement is best practice
- Noscript ensures basic functionality
“User with JS disabled saw blank page. Added noscript message. Now they know why. Essential for accessibility.”
