<td> Tag Syntax

<body>
   ... flow content expected ...
   <table>
      <thead>
         <tr>
            <th>...</th>
            ...
         </tr>
      </thead>
      <tbody>
         <tr>
            <td>...</td>
            ...
         </tr>
      </tbody>
      <tfoot>
         <tr>
            <td>...</td>
            ...
         </tr>
      </tfoot>
   </table>
</body>
Rules for coding the HTML td element

Make sure you understand the difference between a tag and element and are familiar with the definitions of namespace and other HTML terms.

  1. Inside a tr element code one or more td elements, one for each cell in the table row.
  2. Begin the element for each table cell with a starting <td> tag. The element name uses lower case letters and should be in the HTML namespace, which it will pick up automatically from the xmlns attribute on the <html> tag.
  3. Include any attributes of the <td> tag as appropriate.The colspan attribute and rowspan attribute allow merging cells from multiple columns and/or rows.
  4. End the td element with a matching </td> closing tag. (To ensure tags match up properly, it helps to code the starting and ending tags first, then fill in between them.)
  5. Between the <td> starting tag and the </td> ending tag include the inner HTML flow content for the content of the table cell.
  6. Code separate td elements for any additional table cells in the same table row before the </tr> tag for the end of the row.