CSS Table Heading Background

  • Post category:CSS

Get the code of CSS Table Heading Background and watch video tutorials. You can practice using our code editor. Our practical guide will make your learning journey much easier. You can explore the tutorial and learn.

<table>
	<tr>
  	<th>Employee</th>
    <th>Salary</th>
    <th>City</th>
  </tr>
  <tr>
  	<td>Ramzi</td>
    <td>$2000</td>
    <td>Delhi</td>
  </tr>
  <tr>
  	<td>Tasim</td>
    <td>$5000</td>
    <td>New York</td>
  </tr>
  <tr>
  	<td>Tasim</td>
    <td>$5000</td>
    <td>New York</td>
  </tr>
</table>
table, th, td {
  border: 2px solid gray;
  border-collapse: collapse;
}
table {
  width: 100%;
}
th {
  background: blue;
  color: white;
}
th {
  text-align: left;
}