Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
This Tables (table, tr, td, th) worksheet is part of the HTML and CSS Journey journey. Print it as a booklet?
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1<table> <tr><th>Name</th><th>Age</th></tr> <tr><td>Alice</td><td>25</td></tr> </table> | A<table> <tr><th>Product</th><th>Price</th></tr> </table> | |
| 2<tr><td>Sydney</td><td>5m</td></tr> | B<table> <tr> <td>Alice</td> <td>95</td> </tr> </table> | |
| 3<th> creates a header cell - bold and centred by default, used for column or row labels | CA complete table - <table> wraps everything, <tr> defines rows, <th> labels columns, <td> holds data | |
| 4Every <td> and <th> must be inside a <tr>, and every <tr> must be inside <table> | DAll table tag names must be lowercase - <TABLE>, <TR>, <TH> should be <table>, <tr>, <th> | |
| 5<table> <td>Name</td> <td>Score</td> </table> | E<td> cells must be inside a <tr> row - add <tr></tr> wrappers around the cells | |
| 6<TABLE> <TR><TH>Name</TH></TR> </TABLE> | FOne table row with two data cells - the row wraps two <td> elements containing city name and population |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
<tr> — An HTML element that creates one horizontal row inside a table. Every <td> and <th> cell must sit inside a <tr>.<table>
<tr><td>Data</td></tr>
</table><table>
<tr><th>Name</th></tr>
</table><table>
<tr><th>Score</th></tr>
</table><table>
<tr><td>Alice</td></tr>
</table><table>
<tr><th>City</th></tr>
<tr><td>Sydney</td></tr>
</table>