<table> : Table element

Introduction

The <table> element in HTML is used to create a table of data. Tables are composed of rows (<tr>) and cells (<td> or <th>), where <td> represents standard data cells and <th> represents header cells.

Here’s a basic example of how you might use the <table> element:

Output:

In this example:

  • The <table> element defines the table.
  • Each row of the table is defined by the <tr> (table row) element.
  • Within each row, data cells are represented by the <td> (table data) element.

This results in a simple table with five columns: Id, Name, Mobile, desig and City, and two rows of data.

Leave a Comment