Is there a way to hide an element in the body when JavaScript is disabled without adding online styling? I want to accomplish this using external CSS only.
I prefer not to use styles like the example below:
<noscript>
<style>
...some style
</style>
<p class="no-js">You need Javascript enabled to view all of the content on this page.</p>
</noscript>
<body>
<div>element to hide when JS disabled</div>
</body>
Are there any alternatives for achieving this?