Role of CSS :not (selector) Selector

Use the CSS :not(selector) selector to style every element that is not the specified element. You can try to run the following code to implement the :not selector

Example


   
      
   
   
      

Heading 1

     

Heading 2

     

Heading 3

     

This is a paragraph.

     

This is another paragraph.

   
Updated on: 2026-03-11T22:50:41+05:30

402 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements