th color: navy : th color « Tags « HTML / CSS






th color: navy

     






<html>
<head><title>Tables</title>
<style type="text/css">
td {
  text-align: center;
  font-weight: bold;
}

table {
  background-color: blue;
  color: white;
}

caption {
  background-color: red;
  color: yellow;
  font-weight: bold;
}

th {
  background-color: gold;
  color: navy
}

td.center {
  background-color: white;
  color: black;
}
</style></head>

<body>
<table>
    <caption>How to Use Tables</caption>
  <tr>
      <th>Col 1</th>
      <th>Col 2</th>
      <th>Col 3</th>
  </tr>
  <tr>
      <td>X</td>
      <td>X</td>
      <td>X</td>
  </tr>
  <tr>
      <td>X</td>
      <td class="center">X</td>
      <td>X</td>
  </tr>
  <tr>
      <td>X</td>
      <td>X</td>
      <td>X</td>
  </tr>
</table>
</body>
</html>

   
    
    
    
  








Related examples in the same category

1.th color: #333;
2.th color: #FFF;
3.th color: #993300;
4.th color: black;
5.th color: darkslateblue;