Grade 7 Computer Science — HTML lists and tables
Read an HTML list or table, count its items, rows and cells, and say which of its tags sits inside which.
Name: ________________________
1.Match each tag to what one of it holds.
- <ul>
- <ol>
- <li>
- <tr>
- <td>
- A whole list with a bullet against each item
- One cell of a table
- A whole list with a number against each item
- One row of a table
- One item of a list
2.How many cells does that same table hold altogether: “<table><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr><tr><td>5</td><td>6</td></tr></table>”?
3.A table is built from 5 row tags, and each row holds 3 cell tags. How many cells is that altogether?
4.Which of these is nested correctly?
- a) <ul><li>Milk</ul></li>
- b) <ul><li>Milk</li></ul>
- c) <ul><li>Milk</li></ol>
- d) <li><ul>Milk</li></ul>
5.In “<ul><li>Red</li><li>Blue</li><li>Green</li><li>Black</li><li>White</li></ul>”, how many item tags are there altogether, counting the opening and closing tags separately?
6.This table has three rows and three cells in each row. Tap the cell in the second row, third along.
Write the number of the part.
7.Which tag closes “<li>”?
8.A recipe's steps have to be followed in a set order, and the reader needs to see which step is which. Which tag should wrap that list?
- a) <li>
- b) <td>
- c) <ul>
- d) <ol>
Answer key — Grade 7 Computer Science — HTML lists and tables
- 1. <ul> → A whole list with a bullet against each item; <ol> → A whole list with a number against each item; <li> → One item of a list; <tr> → One row of a table; <td> → One cell of a table
- 2. 6
- 3. 15
- 4. b) <ul><li>Milk</li></ul>
- 5. 10
- 6. 6 — Row 2, cell 3
- 7. </li>
- 8. d) <ol>