Build a timetable with at least 3 rows. The first row has 3 or more<th> headings (Day, Period 1, Period 2…). The other rows use <td> cells for each day.
Try twice to unlock the solution (0/2)
index.htmlCtrl ⏎
Preview
Console
Output from console.log appears here.
Checklist
Press Run to check your code.
○
The table has at least 3 rows
○
The first row has 3 or more <th> headings
○
Data rows use <td> cells
Lesson notes (text version)
1. table, tr, th and td
A table is built row by row:
<table> wraps everything
<tr> is one table row
<th> is a heading cell (bold, centred)
<td> is a normal data cell
Every row should have the same number of cells, so the columns line up. Use tables only for real data in rows and columns, not for page layout.
Build a timetable with at least 3 rows. The first row has 3 or more<th> headings (Day, Period 1, Period 2…). The other rows use <td> cells for each day.
2. thead, tbody and caption
Bigger tables are split into parts:
<caption> — the table’s title, right after <table>
<thead> — the heading row(s)
<tbody> — the data rows
This helps screen readers and lets you style the header separately. A little CSS makes tables neater: border-collapse: collapse joins the cell borders into single lines.