<noscript>: The HTML noscript element

I. Description

The HTML <noscript> element is used to encapsulate HTML which will be inserted into a webpage when JavaScript is unavailable or JavaScript has been turned off.

The <noscript> element is most useful if you have a website that requires JavaScript to display the webpage properly and you would like to display an error message to users if their web browesr does not support JavaScript or JavaScript has been turned off.

II. Examples

<!DOCTYPE html>
<html>
    <head>
        <title>NoScript Example Page</title>
    </head>
    <body>
        <main>
            <h1>Weather Report for 2025-May-13</h1>
            <noscript>
                <p>
                    <b>Unable to display weather report.</b><br/>
                    Your web browser does not support the use
                    of Javascript, or Javascript has been turned off.<br/>
                    Please enable Javascript, or use a web browser that supports Javascript.
                </p>
            </noscript>
            <article id="weather_report">
                <!-- Weather Report should be dynamically inserted into this element via Javascript -->
            </article>
        </main>
    </body>
</html>

This document was last updated: