HTML Table
The <table> element displays data in rows and columns. Rows are made with <tr>, header cells with <th>, and data cells with <td>.
Web
Tables are meant for tabular data — things that genuinely belong in a grid of rows and columns, like a price list or schedule. They should not be used for general page layout.
Add a <thead> and <tbody> to separate header rows from body rows, which improves both structure and accessibility.
Examples
HTML
<table>
<tr><th>Name</th><th>Age</th></tr>
<tr><td>Ana</td><td>30</td></tr>
</table>Output:
Renders a two-column table with a header row (Name, Age) and one data row (Ana, 30).