Creating and Structuring Tables

<table> Tag:

The <table> tag acts as the container for all table-related tags defining the overall structure of the table.

<tr> Tag (Table Row):

When it comes to the <tr> tag it defines rows within the table. Each row can consist of cells, which can be either header cells (<th>) or standard cells (<td>).

<th> Tag (Table Header):

For header cells in the table, we use the <th> tag. These cells are usually bold and centered by default. By using <th> we distinguish headers from data in the table indicating that the content inside serves as a heading for a column or row.

<td> Tag (Table Data):

On the other hand, standard data cells in the table are represented by the <td> tag. Each <, td> element is positioned within a <tr> to specify its association with a row.

Example of an HTML Table:

<table>
    <tr>
        <th>Name</th>
        <th>Email</th>
        <th>Age</th>
    </tr>
    <tr>
        <td>Joy</td>
        <td>joy@example.com</td>
        <td>30</td>
    </tr>
    <tr>
        <td>Jane</td>
        <td>jane@example.com</td>
        <td>25</td>
    </tr>
</table>

logo

HTML

Creating and Structuring Tables

Beginner 5 Hours

<table> Tag:

The <table> tag acts as the container for all table-related tags defining the overall structure of the table.

<tr> Tag (Table Row):

When it comes to the <tr> tag it defines rows within the table. Each row can consist of cells, which can be either header cells (<th>) or standard cells (<td>).

<th> Tag (Table Header):

For header cells in the table, we use the <th> tag. These cells are usually bold and centered by default. By using <th> we distinguish headers from data in the table indicating that the content inside serves as a heading for a column or row.

<td> Tag (Table Data):

On the other hand, standard data cells in the table are represented by the <td> tag. Each <, td> element is positioned within a <tr> to specify its association with a row.

Example of an HTML Table:

<table>
    <tr>
        <th>Name</th>
        <th>Email</th>
        <th>Age</th>
    </tr>
    <tr>
        <td>Joy</td>
        <td>joy@example.com</td>
        <td>30</td>
    </tr>
    <tr>
        <td>Jane</td>
        <td>jane@example.com</td>
        <td>25</td>
    </tr>
</table>

Similar Data Science Tutorials

Related tutotials

Frequently Asked Questions for html

line

Copyrights © 2024 letsupdateskills All rights reserved