CKTIS / HTML
noscript — fallback content without scripting
The `noscript` element provides fallback content when scripting is disabled. It does not detect JavaScript errors or failures to load a script.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
<noscript>fallback content</noscript>noscript represents its children when scripting is disabled; when scripting is enabled, it represents nothing. In HTML syntax, the parser then treats its contents as text rather than ordinary elements. Both tags are required; nesting noscript is prohibited.
In head, fallback content may contain only link, style, and meta. Outside head, when parsed with scripting disabled, its content model is transparent: the content must be permitted in the surrounding context. When parsed with scripting enabled, its content must be text that meets the HTML Standard’s conformance requirements. The element supports global attributes. It must not be used in XML documents, where it does not provide this mechanism.
This is not script-failure handling: with scripting enabled, an error or failed download does not activate the fallback. Prefer a page that works without scripts and that JavaScript subsequently enhances.
Examples
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>noscript example</title>
</head>
<body>
<p>Always visible.</p>
<noscript><p>Scripting is disabled.</p></noscript>
</body>
</html>Result
Scripting enabled: Always visible. Scripting disabled: Always visible. Scripting is disabled.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.