user3278440
12
Q:

table css

.table1 {
  border-collapse: collapse;
}
2
table, th, td {
  border: 1px solid black;
}
7
tr , th , td  {
    border: 1px solid black;
    padding: 5%;
    text-align: center;
}
2
<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

    <table>

       
      <tr>

         
      <th>Month</th>

         
      <th>Savings</th>

       
      </tr>

       
      <tr>

         
      <td>January</td>

         
      <td>$100</td>

       
      </tr>

      </table>
 
11

#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

New to Communities?

Join the community