TLDR Web Dev · ARTICLES & TUTORIALS
HIDING ELEMENTS THAT REQUIRE JAVASCRIPT WITHOUT JAVASCRIPT
Summary from the TLDR Web Dev newsletter
Hiding HTML elements that require JavaScript when JavaScript is disabled is possible. There are three methods: using JavaScript to enable a class, overriding styles with `noscript`, and lastly, the preferred approach of using a `d-js-required` class. This class is combined with `noscript` and CSS hides elements by default unless JavaScript is active.