Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> .text-blue { color: blue; } ul li:not(.text-blue) { color: #8ebf42; } </style> </head> <body> <h2>:not() selector example</h2> <ul> <li>List item 1</li> <li class="text-blue">List item 2</li> <li>List item 3</li> </ul> </body> </html>