Syntax
<noscript>
<p>This site requires JavaScript to function.</p>
</noscript>Examples
Basic Warning Message
Informing users that JavaScript is required.
<noscript>
<p>Please enable JavaScript to use this application.</p>
</noscript>Fallback Content
Providing a non-JavaScript fallback for an interactive feature.
<div id="live-chart"></div>
<noscript>
<img src="/static-chart.png" alt="Sales chart (static fallback)">
</noscript>Styled Notice
A styled banner shown only without JavaScript.
<noscript>
<div style="background: #fef3c7; padding: 12px; text-align: center;">
Some features are unavailable with JavaScript disabled.
</div>
</noscript>Best practices
- Use noscript to gracefully inform users rather than leaving them with a blank or broken page
- Where practical, provide genuine fallback content or functionality, not just a warning message
- Remember content inside noscript is only rendered when scripting is off — do not rely on it for anything that should also work normally
- Test your site with JavaScript disabled occasionally to see what your users without it actually experience
At a glance
- Purpose
- Structure and meaning for web content
- File extension
- .html · .htm
- Runs in
- Web browsers
- Usually used with
- CSS and JavaScript
Specifications & further reading
Related HTML documentation
<script>
The <script> element embeds or references executable JavaScript code within an HTML document. It can contain inline code directly between its tags, or load an external file via the src attribute. Where scripts are placed and how they load (defer, async, or neither) significantly affects page load performance and execution order.<canvas>
The <canvas> element provides a blank, resizable bitmap surface for drawing graphics, animations, and visualizations via JavaScript — typically using the Canvas 2D API or WebGL. Unlike SVG, canvas content is pixel-based rather than made of individually addressable DOM elements, which makes it well-suited for games, charts, and pixel-level image manipulation.<template>
The <template> element holds HTML content that the browser parses but does not render or execute when the page loads. Its content is inert — scripts inside it will not run, and images inside it will not load — until it is cloned into the visible DOM via JavaScript. This makes it a clean way to define reusable markup fragments for dynamic UI without building HTML strings in JavaScript.HTML
HTML (HyperText Markup Language) is the standard markup language for creating web pages. It structures web content using elements and tags, defining everything from headings and paragraphs to images and links. HTML forms the backbone of every website, working alongside CSS for styling and JavaScript for interactivity.
The <script> element embeds or references executable JavaScript code within an HTML document. It can contain inline code directly between its tags, or load an external file via the src attribute. Where scripts are placed and how they load (defer, async, or neither) significantly affects page load performance and execution order.<canvas>
The <canvas> element provides a blank, resizable bitmap surface for drawing graphics, animations, and visualizations via JavaScript — typically using the Canvas 2D API or WebGL. Unlike SVG, canvas content is pixel-based rather than made of individually addressable DOM elements, which makes it well-suited for games, charts, and pixel-level image manipulation.<template>
The <template> element holds HTML content that the browser parses but does not render or execute when the page loads. Its content is inert — scripts inside it will not run, and images inside it will not load — until it is cloned into the visible DOM via JavaScript. This makes it a clean way to define reusable markup fragments for dynamic UI without building HTML strings in JavaScript.HTML
HTML (HyperText Markup Language) is the standard markup language for creating web pages. It structures web content using elements and tags, defining everything from headings and paragraphs to images and links. HTML forms the backbone of every website, working alongside CSS for styling and JavaScript for interactivity.