HTML: Tables
Learn Tables in HTML with practical examples.
HTML — Tables
Overview
Tables display structured data (rows/columns).
What you'll learn
- table, tr, th, td
- caption
- basic styling
- accessibility
Syntax
<table>...</table>
Example
<table>
<caption>Prices</caption>
<tr><th>Item</th><th>Price</th></tr>
<tr><td>Book</td><td>$10</td></tr>
<tr><td>Pen</td><td>$2</td></tr>
</table>
Notes
- Use
for header cells. - Add caption when helpful.
Try: Open the Playground: /en/playground/html
- Add caption when helpful.