:not()
The negation pseudo-class, :not(X), is a functional notation taking a simple selector X as an argument. It matches an element that is not represented by the argument. X must not contain another negation selector, or any pseudo-elements.
The specificity of the :not pseudo-class is the specificity of its argument. The :not pseudo-class does not add to the selector specificity, unlike other pseudo-classes.
Example
<!DOCTYPE html> <html> <head> <style> p: not (.classy ) { color: red; } : not ( p ) { color: green; } </style> </head> <body> <p>Some text.</p> <p class="classy">Some other text.</p> <span>One more text<span> </body> </html>