html · level 2 · unit 3 · lesson 1
- meet it
- guess first
- your turn
- fix it
- nailed it
Tap a green word if you get lost.
meet it
A names the whole table.
A table of numbers means little until you know what it shows. A caption is its title. Write <caption> as the very first thing inside <table>, before any row.
Browsers show it above the table, centred. Screen readers announce it first, so listeners know which table they have reached before the facts start.
Keep it short and specific: Swimming lessons, autumn term tells people far more than Table 1.
<table>
<caption>Swimming lessons, autumn term</caption>
<tr><th>Day</th><th>Time</th><th>Price</th></tr>
<tr><td>Monday</td><td>17:00</td><td>£8</td></tr>
<tr><td>Saturday</td><td>09:30</td><td>£10</td></tr>
</table> Press show my page to see it here.
A caption beats a heading above the table, because the browser knows the caption and the table belong together.
guess first
The caption is written last. Where does it show?
Guess before you run it. Wrong guesses are how you learn, and nothing is marked.
<table>
<tr><th>Snack</th><th>Price</th></tr>
<tr><td>Flapjack</td><td>£1.20</td></tr>
<caption>Tuck shop prices</caption>
</table>
your turn
Your turn. Name this table.
Add a caption on line 2 that says what the table shows, such as Bus times to the beach.
Press show my page to see it here.
- the table starts with a captionnot checked yet
- there is one captionnot checked yet
fix it
The caption has fallen out of the table. Can you fix it?
Press show my page to see it here.
- the caption is inside the tablenot checked yet
- Club league table shows as plain words. Is the caption part of the table?
- A caption must sit inside
<table>, as the very first thing. - Swap lines 1 and 2, so
<caption>comes straight after<table>.
nailed it
your table has a name. :D
<caption>names a table.- It goes first inside
<table>. - Screen readers announce it before the facts.
new words in your collection
- caption
This lesson isn’t saved. A free account remembers every lesson you finish.