Background-color of table cell - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table Cell

Description

Background-color of table cell

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">
table {<!--   w w w.  j  a v  a2  s  .c  o  m-->
   width:100%
}

td:first-child {
   bgcolor:Chartreuse;
   background:yellow;
   width:18%;
   font-weight:bold
}
</style> 
 </head> 
 <body> 
  <table> 
   <tbody> 
    <tr> 
     <td class="foo">Lorem i</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials