HTML and CSS · lesson 22 of 30 · free

Tables — HTML and CSS for kids

Tables show data in rows and columns, like a marks list or a timetable. The table tag holds everything. Each tr tag is one table row, and each row holds cells: td for a normal data cell and th for a heading cell, which is bold and centred. Rows times cells per row gives the total number of cells.

▶ Watch how it works

Got it? Practise ↓

Code tip

Rows hold cells — “count the tr tags for rows and the cells inside each row”

  1. <table> holds rows <tr>; each row holds cells <td> (data) or <th> (heading).
  2. Rows = number of <tr>; cells in a row = <td> + <th> in it.
  3. Total cells = rows × cells per row.

Use it for: Showing marks, timetables, scores and price lists on a page.

Worked example: 📊 How many cells does this table have in all?
<table>
  <tr><th>Name</th><th>Fruit</th></tr>
  <tr><td>Papaya</td><td>Litchi</td></tr>
  <tr><td>Guava</td><td>Orange</td></tr>
</table> → 6

  1. There are 3 rows (<tr>) with 2 cells each.
  2. 3 rows × 2 cells = 6 cells.

Check: 2 heading cells + 4 data cells = 6 ✓

▶ Watch it animated

✏️ Practice

Work it out in your head or on paper, type the answer and press Check. Stuck? Press “Show me how”.

Right: 0 · Tried: 0

🏁 Lesson 22 test

20 questions. Check each answer, then go to the next one. Get 16 or more right to pass.

🏅 Sign in with Google to earn the 📊 HTML Table Builder badge when you pass — and a certificate when you finish all 10 lessons of Part 3 · Web Development. You can still take the test without signing in.

🖨️ HTML Worksheet: Tables

✨ Free AI tutor

Ask the AI tutor about this lesson

Why does it work? When should you use it? Ask in English, मराठी or हिंदी.

Sign in with Google to ask Free — 20 questions a day.

👩‍🏫 HTML and CSS classes near you — online or at home

Prefer a real teacher? TalentJR teachers take live online classes anywhere in India and visit homes in selected cities. Tell us what you need and our team will call you with timings and fees.

Live online classesSmall groups or 1:1 with a teacher, from home, any city.
Teacher at homeA TalentJR teacher visits your home (selected cities).
At a centreClasses at a TalentJR partner centre near you, where available.
Badges, certificates & gifts A badge for every lesson you pass, a certificate for every part you finish, plus TalentJR Points for daily practice. Computer worksheets Flowcharts, block coding, spreadsheets and safe internet.