top of page

How to add the Table header? <table></table>

Table have cells and table headers for the column headers

  • Table tag <table></table>

  • Inside <table> we need to add the attribute to create the table header:

  • Table Row: <tr></tr>

  • Table Header: <th></th>

Example:

<table>

      <tr>

<th>Sunday</th>

<th>Monday</th>

<th>Tuesday</th>

<th>Wednesday</th>

<th>Thursday</th>

<th>Friday</th>

<th>Saturday</th>

        </tr>

</table>

Screenshot 2025-12-02 at 11.08.01 AM.png

How to add the second row of data in the table? <td></td>

  • Inside table we add a row for the data <tr></tr>

  • Inside the table row <tr> we add table data <td></td>

  • Example:

                               <tr>

                               <td>English</td>

                               <td>Social Study</td>

                               <td>Math</td>

                               <td>Science</td>

                               <td>Computer Study</td>

                               <td>Art</td>

                               <td>PE</td>

                               </tr>

Screenshot 2025-12-02 at 11.32.53 AM.png

Remember to save the file every time you change any thing in your website and reload the browser, otherwise you cannot review what you change!!!

bottom of page