php – Noscript not working as it should in wordpress site

This is what I’ve done in my custom functions mu-plugin:

function jsdisabled() {
print '<noscript>

<div style="margin:auto; display:table; text-align:center">
<div style="margin:auto; display:table; width:70%">
<h2>Some text.
<img src=""/>
add_action('wp_head', 'jsdisabled', 0);

This code adds noscript tags to wordpress header, but when I test the page with browser javascript disabled, what happens is that the noscript message and image will show, but the entire page content will show too, in other words, noscript is supposed to hide all the website’s content and show only a message to visitors telling them to enable javascript.

You can verify it here: