HTML5 Tables
HTML
What is an HTML table?
An HTML table is used to display data in rows and columns, just like a spreadsheet or a table on paper.
Tables are created using <table>
tag, with rows created using <tr>
, and data cells inside rows using <td>
.
You can also use <th>
for header cells.
Tag | Meaning |
---|---|
<table> | The container for the whole table. |
<tr> | Table row (creates a new horizontal line). |
<th> | Table header cell (bold + centered by default). |
<td> | Table data cell (normal cell). |