Using the th element for table headings : table body : Table Style HTML CSS TUTORIALS


HTML CSS TUTORIALS » Table Style » table body »

 

Using the th element for table headings


 

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

<head>
  <title>Using the &lt;th&gt; element for table headings</title>
</head>

<body>
<table border="1">

  <tr>
    <th></th>
    <th>O($)</th>
    <th>R($)</th>
    <th>P($)</th>
  </tr>

  <tr>
    <th>Q1 (Jan-Mar)</th>
    <td>1.00</td>
    <td>2.00</td>
    <td><b>1.00</b></td>
  </tr>

  <tr>
    <th>Q2 (Apr-Jun)</th>
    <td>1.00</td>
    <td>2.00</td>
    <td><b>1.00</b></td>
  </tr>

  <tr>
    <th>Q3 (Jul - Sep)</th>
    <td>1.00</td>
    <td>2.00</td>
    <td><b>1.00</b></td>
  </tr>

  <tr>
    <th>Q4 (Oct - Dec)</th>
    <td>1.00</td>
    <td>2.00</td>
    <td><b>1.00</b></td>
  </tr>
</table>
</body>
</html>

 



HTML code for linking to this page:

Follow Navioo On Twitter

HTML CSS TUTORIALS

 Navioo Table Style
» table body