<table>
  <caption>A summary of top sites with both paid and free course</caption>
  <thead>
    <tr>
      <th scope="col">Website</th>
      <th scope="col">Certification</th>
      <th scope="col">Tuition</th>
      <th scope="col">Top Courses</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th scope="row">Freecode Camp</th>
      <td>Yes</td>
      <td>Free</td>
      <td>Web Development and Design</td>
    </tr>
    <tr>
      <th scope="row">Udemy</th>
      <td>Yes</td>
      <td>Paid</td>
      <td>Python and Machine Learning</td>
    </tr>
    <tr>
      <th scope="row">Coursera</th>
      <td>Yes</td>
      <td>Free and Paid</td>
      <td>IoT and AI</td>
    </tr>
  </tbody>
  <tfoot>
    <tr>
      <th>Total Courses</th>
      <td colspan="4">Unlimited</td>
    </tr>
  </tfoot>
</table>
table {
  text-align: left;
  position: relative;
  border-collapse: collapse; 
  background-color: #f6f6f6;
}/* Spacing */
td, th {
  border: 1px solid #999;
  padding: 20px;
}
th {
  background: #ffc107;
  color: white;
  border-radius: 0;
  position: sticky;
  top: 0;
  padding: 10px;
}

tfoot > tr  {
  background: black;
  color: white;
}
tbody > tr:hover {
  background-color: #ffc107;
}
Run Pen

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.