DEV Community

Rishi
Rishi

Posted on

One query to remove all CSS at once

3 Types of CSS Styles:

  • Inline
  • External
  • Internal

Most sites have CSS scattered around all these 3 types.

That one query which clears all CSS from a page.

Hit F12 to open the console from the Developer tool.

Alt Text

CtrlC this command:

document.querySelectorAll('style,link[rel="stylesheet"]').forEach(style => style.remove());

Then, CtrlV in the console.
Hit Enter , et Voilà!

Discussion (0)