td text-align : table cell : Table Style HTML CSS TUTORIALS


HTML CSS TUTORIALS » Table Style » table cell »

 

td text-align


 





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

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Table Style
» table cell