Table Basics
An HTML table is defined with the <table> tag. A table row is created with <tr>, a table data cell with <td>, and a table header cell with <th>. By default, <th> text is bold and centered.
Table Structure
Every cell in a row must be inside a <tr> element. All rows must be inside the <table> element. A simple border can be added with the CSS border property. For the border to appear around every cell (not just the outer table), add border-collapse: collapse to the table.
<table>— Container for the whole table<tr>— A table row<th>— Header cell (bold, centered)<td>— Data cell