Check out example codes for "table css border". It will help you in understanding the concepts better.

Code Example 1

<table>

       
      <tr>

         
      <th>Month</th>

         
      <th>Savings</th>

       
      </tr>

       
      <tr>

         
      <td>January</td>

         
      <td>$100</td>

       
      </tr>

      </table>

Code Example 2

<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>

Code Example 3

table, th, td {
  border: 1px solid black;
}

Code Example 4

#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;
}

Learn ReactJs, React Native from akashmittal.com