Class 6 Computer Science — Reading HTML tags
Read a line of HTML: find the opening and closing tags of an element, and say what a browser will show.
Name: ________________________
1.In the line "<b>Arena</b> is a school", which single word will a browser show in bold?
2.Here is some HTML: "<ul><li>Tea</li><li>Milk</li><li>Sugar</li></ul>". How many items are in the list?
3.An element opens with the tag "<b>". Write the tag that closes it.
4.Here is some HTML: "<ul><li>Red</li><li>Green</li></ul>". How many items are in the list?
5.Here is a line of HTML: "<p>Hello</p>". Every element has an opening tag and a closing tag. Write the closing tag from that line.
6.Sort each tag by whether it opens an element or closes one.
Groups: Opening tag · Closing tag
- <p>
- </li>
- <h1>
- </h1>
- </p>
- <li>
7.Which one of these is a closing tag?
- a) </h1>
- b) <h1>
- c) h1
- d) <h1
8.In the line "<h1>Welcome</h1>", which single word will a browser show as the heading?
Answer key — Class 6 Computer Science — Reading HTML tags
- 1. Arena
- 2. 3
- 3. </b>
- 4. 2
- 5. </p>
- 6. <p> → Opening tag; </p> → Closing tag; <h1> → Opening tag; </h1> → Closing tag; <li> → Opening tag; </li> → Closing tag
- 7. a) </h1>
- 8. Welcome