Updates
  • Starting New Weekday Batch for Full Stack Java Development on 15 September 2025 @ 02:00 PM to 04:00 PM
  • Starting New Weekday Batch for MERN Stack Development on 29 September 2025 @ 04:00 PM to 06:00 PM
Join Course

HTML Tables

• Tables in HTML are used to organize and display data in rows and columns.
• Tables are created using the <table> element, which serves as the container for the table.
• The structure of a table consists of <tr> (table row) elements to define rows and <td> (table data/cell) elements to define cells within each row.
• You can also use <th> (table header) elements to define headers for columns or rows.
• CSS can be applied to tables to style them, such as setting border colors, adjusting spacing, and adding background colors.

            
<!DOCTYPE html>
<html>
<head>
    <title>Table</title>
</head>
<body>
    <h1>Table</h1>
    <table>
        <tr>
            <th>Name</th>
            <th>Age</th>
        </tr>
        <tr>
            <td>Som</td>
            <td>40</td>
        </tr>
       <tr>
            <td>Rahul</td>
            <td>25</td>
        </tr>
    </table>
</body>
</html>