# How to remove all CSS from a page at once

> Learn how to strip all the CSS from a page at once by running one console command that selects every style and stylesheet link and calls remove() on each.

Author: Flavio Copes | Published: 2020-04-12 | Canonical: https://flaviocopes.com/how-to-remove-all-css/

I wanted to see how a page looked like without CSS.

One way I know is to open the DevTools, in the Sources panel you'll see the list of CSS files. You can remove the content in the CSS file in there, and the page will change. For example here's my <thereactcourse.com> site.

It has 3 CSS files, and I can go and delete the whole content of one:

![Browser DevTools Sources panel showing CSS files with styles.css containing visible CSS code](https://flaviocopes.com/images/how-to-remove-all-css/Screenshot_2020-04-06_at_17.27.38.jpg)

and this is what happens, the page changes because we removed the CSS:

![Website after CSS removal showing only React logo and text with empty styles.css in DevTools](https://flaviocopes.com/images/how-to-remove-all-css/Screenshot_2020-04-06_at_17.28.50.jpg)

> Note that this just changes the browser's version of the CSS, does not interact in any way with your file, even if it's local

But some sites today embed the CSS in a `style` tag (including mine), and some have loads of CSS files scattered around, and it's not practical.

Open the console and run this command:

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

This removes both inline and linked CSS.
