Skip to content

Show ONLY JavaScript Disabled message [closed]

I want to show a message that says “Please enable JavaScript to use this site” in the case that JavaScript is disabled, and nothing else to be displayed when JavaScript is disabled.

Please do not reply ONLY about the <noscript> tag or code like this.


Use <noscript>, with a <style> rule inside the <noscript> that hides everything else using the body > *:not(noscript) selector:

            body > *:not(noscript) {
                display: none;
        <p>Please enable JavaScript</p>