Put the message in the <div> , which is wrapped in the <noscript> . If JavaScript is disabled, the <div> will be displayed as part of the DOM; if the script is included, the div will not be in the DOM.
For example, you can put the following immediately after the opening of the <body> and style it with CSS to have a red background to make it more visible.
<noscript> <div id="js-warning"> To be able to access all of our features, you need a browser that supports JavaScript, and it needs to be enabled. </div> </noscript>
Franci penov
source share