Select element with [] and :not - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:not

Description

Select element with [] and :not

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
div[test] {<!--   ww w  .  j  av  a 2s  . c  o  m-->
   color:Chartreuse;
}

*:not([test]) {
   color:yellow;
}
</style> 
 </head> 
 <body> 
  <div test>
    lol 
  </div> oo 
  <span>dd</span>  
 </body>
</html>

Related Tutorials