Setup title and list in tables - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Table

Description

Setup title and list in tables

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <style>
table {<!--from w w w  .j  av  a 2s. c o  m-->
   font-family:arial, sans-serif;
   border-collapse:collapse;
   width:100%;
}

td, th {
   border:2px solid Chartreuse;
   text-align:left;
   padding:9px;
}

tr:nth-child(even) {
   background-color:yellow;
}
</style> 
 </head> 
 <body> 
  <table> 
   <tbody> 
    <tr> 
     <th>Lor</th> 
     <th>Lore</th> 
     <th>Lorem ipsu</th> 
    </tr> 
    <tr> 
     <td>Lorem ips</td> 
     <td>Lorem ips</td> 
     <td>Lorem ips</td> 
    </tr> 
    <tr> 
     <td>Lore</td> 
     <td>Lore</td> 
     <td>Lorem ipsu</td> 
    </tr> 
    <tr> 
     <td>Lore</td> 
     <td>Lore</td> 
     <td>Lorem ipsu</td> 
    </tr> 
   </tbody> 
  </table>  
 </body>
</html>

Related Tutorials