HTML
June 3, 2026 2 min read

Table tag in HTML

HS
HEMANT SINGH
Technical Writer & Educator

Table tags

Table has number of tags to define table structure on the web page.

  1. <table>
  2. <thead> – Table head
  3. <tbody> – Table body
  4. <tr> – Table row
  5. <th> – Table heading
  6. <td> – Table data
  7. <caption> – Table caption, contain text or title about table data.
  8. <tfoot> – Table footer

Example

 

<table border=”1″ width=”100%”>
  <caption>Product prices</caption>
  <thead>
   <tr>
    <th>Sr no</th>
    <th>Product</th>
    <th>Price</th>
   </tr>
  </thead>
  <tbody>

   <tr>
    <td>1</td>
    <td>Mouse</td>
    <td>Rs. 300</td>
   </tr>

   <tr>
    <td>2</td>
    <td>Monitor</td>
    <td>Rs. 3000</td>
   </tr>

   <tr>
    <td>1</td>
    <td>Keyboard</td>
    <td>Rs. 800</td>
   </tr>
  </tbody>
  <tfoot>3 Rows</tfoot>
 </table>