Chapter 9
Beginner
9 min read
Core Elements
HTML Tables
HTML tables display tabular data in rows and columns using a structured set of tags.
🎯 What you'll learn
✓Create tables with
<table>,
<tr>, <td>
✓Add headers with <th>
✓Use <thead>,
<tbody>,
<tfoot>
✓Span cells with colspan and
rowspan
Introduction to HTML Tables
This chapter covers HTML Tables in depth. Understanding this topic is essential for writing clean, modern HTML. Use the live editor below to experiment as you read.
💡 In This Chapter
You will see real code examples, clear
explanations, and
a live editor to practice immediately — no setup needed.
Basic Table
Core table markup.
HTML
<table>
<thead>
<tr><th>Name</th><th>Age</th></tr>
</thead>
<tbody>
<tr><td>Alice</td><td>22</td></tr>
</tbody>
</table>
Colspan
Span multiple columns.
HTML
<td colspan="2">Spans 2 columns</td>
Try It Yourself
Edit the code below and click ▶ Run to see your changes live.
Live Editor
✎ Editor
👁 Preview
❓ Quick Check — Chapter 9
Which tag defines a table header cell?
📄 Chapter Summary
- Create tables with <table>, <tr>, <td>
- Add headers with <th>
- Use <thead>, <tbody>, <tfoot>
- Span cells with colspan and rowspan