Select element withno class attribute and id attribute - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:id

Description

Select element withno class attribute and id attribute

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">
a:not([class]):not([id]) {
   background-color:Chartreuse;
   color:yellow;
}
</style> <!--   w ww  .ja  va  2s  .com-->
 </head> 
 <body> 
  <a class="c" id="i">L</a> 
  <a>L</a> 
  <a class="c">L</a> 
  <a id="l">L</a> 
  <a class="c" id="m">L</a> 
  <a class="c">L</a>  
 </body>
</html>

Related Tutorials