# CSS, how to select elements that do NOT have a class

> Learn how to select HTML elements that do not have a class in CSS using the :not() selector, for example p:not(.description) to style unclassed paragraphs.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2023-02-15 | Topics: [CSS](https://flaviocopes.com/tags/css/) | Canonical: https://flaviocopes.com/css-how-to-select-elements-that-do-not-have-a-class/

To select elements in an HTML document that do NOT have a class, you can use this:

```css
:not(.class)
```

For example:

```css
p:not(.description) {
  color: red;
}
```
