CSS Selecting First Child - HTML CSS CSS Selector

HTML CSS examples for CSS Selector:last-child

Description

CSS Selecting First Child

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">
.the-wrapper .the-table:last-child {
   color:Chartreuse;
}
</style> <!--   w  w w.j av  a2 s . c om-->
 </head> 
 <body> 
  <div class="the-wrapper"> 
   <table class="the-table"> 
    <tbody> 
     <tr> 
      <td>Lore</td> 
     </tr> 
    </tbody> 
   </table> 
   <table class="the-table"> 
    <tbody> 
     <tr> 
      <td>Lore</td> 
     </tr> 
    </tbody> 
   </table> 
  </div>  
 </body>
</html>

Related Tutorials