About 1981 letters

About 10 minutes

#HTML's tables

HTML tables are defined using the <table> tag.

  • Table headers use the <thead> tag
  • Table body uses the <tbody> tag
  • Table rows use the <tr> tag
  • Header cells use the <th> tag
  • Standard cells use the <td> tag.
<table border="1">
    <thead>
        <tr>
            <th scope="col">No.</th>         <!-- Column header -->
            <th scope="col">Tag</th>         <!-- Column header -->
            <th scope="col">Description</th> <!-- Column header -->
        </tr>
    </thead>

    <tbody>
        <tr>
            <th scope="row">1</th>          <!-- Row header -->
            <td>table</td>
            <td>Defines a table</td>
        </tr>
        <tr>
            <th scope="row">2</th>           <!-- Row header -->
            <td>tr</td>
            <td>Defines a table row</td>
        </tr>
        <tr>
            <th scope="row">3</th>           <!-- Row header -->
            <td>th</td>
            <td>Defines a header cell</td>
        </tr>
        <tr>
            <th scope="row">4</th>           <!-- Row header -->
            <td>td</td>
            <td>Defines a standard cell</td>
        </tr>
    </tbody>
</table>

HTML Table

Updated: 5/21/2025

Author: PlanC

Created: 5/16/2025