Tom
0
Q:

table border css

table, th, td {
  border: 1px solid black;
}
7
<html>
 <head>
   <title>Working with HTML Tables</title>
 </head>
 <body>
   <table>				<!-- create an table object -->
     <tr>				<!-- "tr" represents a row -->
       <th>Name</th>	<!-- use "th" to indicate header row -->
       <th>Date of Birth</th>
       <th>Weight</th>
     </tr> 
     <tr>				<!-- once again use tr for another row -->
       <td>Mary</td>	<!-- use "td" henceforth for normal rows -->
       <td>12/13/1994</td>
       <td>130</td>
     </tr>    
   </table>
 </body>
</html>
3

#customers td, #customers th {
  border: 1px solid #ddd;
  padding: 8px;
}

#customers tr:nth-child(even){background-color: #f2f2f2;}

#customers tr:hover {background-color: #ddd;}

#customers th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: #4CAF50;
  color: white;
}
0

<table style="width:100%">
 
<tr>
    <th>Firstname</th>

    <th>Lastname</th> 
    <th>Age</th>

 
</tr>
 
<tr>
    <td>Jill</td>

    <td>Smith</td> 
    <td>50</td>

 
</tr>
  <tr>
    <td>Eve</td>

    <td>Jackson</td> 
    <td>94</td>

  </tr>
</table>
 
0

New to Communities?

Join the community