Noscript (<noscript>)
When to use
Use the <noscript> element to represent its children if JavaScript is disabled in the user agent. If JavaScript is enabled, then the <noscript> element represents nothing. 2
Rules
- There are many reasons why JavaScript might be disabled on a website. This is way progressive enhancement is an important accessibility tool. It describes, that the website works as a static website without JavaScript. JavaScript then adds interactivity to the static site. This way a website is mostly usable even when JavaScript is disabled.
- Most of the time progressive enhancement can best be accomplished without the use of the <noscript> element. This is because the element is a very blunt tool and thoughtful progressive enhancement achieves better results most of the time. 2
- A use-case for this element could in cases where the website absolutely does not work without JavaScript. In such situations creating an alternative content via the <noscript> element that states that the website does not work when JavaScript is disabled, does at least let the user know why the website is failing. 1
- The element could also be used to redirect a user to a site that works without JavaScript. 1