Skip to main content

The <noscript> Element

As defined in the HTML Living Standard, the <noscript> element is used to provide fallback content for users who have disabled JavaScript in their browser or are using a browser that does not support it.

Example:
<noscript>
  <p>This site requires JavaScript to function fully. Please enable it in your browser settings.</p>
</noscript>

While JavaScript is ubiquitous, providing a <noscript> fallback is a hallmark of resilient, accessible design.

View HTML Living Standard: The noscript element

Accessibility Impact: Graceful Degradation

For some users, disabling JavaScript is a security or privacy choice. For others, it may be a necessity due to the limitations of their assistive software.

WCAG Requirement: Robustness

Principle 4: Robust. Content must be robust enough that it can be interpreted reliably by a wide variety of user agents, including assistive technologies.

If your site's primary navigation or core functionality depends entirely on JavaScript, a <noscript> message is the minimum requirement to inform the user why the page isn't working and how to fix it.

Understand Principle 4: Robust

Best Practices for Noscript Fallbacks

A11y Tip: The "No-JS" Class

A common pattern is to add a class to the <html> tag and use a small inline script to change it to . This allows you to style the page differently for users without JavaScript using CSS.