CSS :not(s) Selector
Example
:not(p) {
color: red;
}
Meaning
The :not(selector) selector selects elements that do not match the element/selector.
Since it prevents specific items from being selected, it is known as the negation pseudo-class.
Version: CSS3
Standard Syntax
:not(selector) {
css declarations;
}
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Status
Parameter Values
The following table describes the values of this selector.
Value | Description |
---|---|
selector | The :not() pseudo-class requires a comma-separated list of one or more selectors as its argument. |