Year 7 Computing — 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 a line of HTML: "<p>Hello</p>". Every element has an opening tag and a closing tag. Write the closing tag from that line.
3.Which one of these lines is written correctly, with each element closed inside the one that holds it?
- a) <b>Hi</i>
- b) <i>Hi<b>
- c) <b><i>Hi</i></b>
- d) <b><i>Hi</b></i>
4.Match each tag to what it makes on the page.
- <p>
- <h1>
- <ul>
- <li>
- <b>
- A paragraph of writing
- A list with bullet points
- One single item in a list
- A large heading
- Writing in bold
5.Which one of these is a closing tag?
- a) h1
- b) <h1
- c) <h1>
- d) </h1>
6.You write an opening <b> tag and forget its closing tag altogether. What is a browser most likely to do?
- a) Add the closing tag for you in your file
- b) Refuse to show the page at all
- c) Keep applying that tag to everything after it
- d) Show the missing tag as words on the page
7.Sort each tag by whether it opens an element or closes one.
Groups: Opening tag · Closing tag
- </p>
- <li>
- <h1>
- </li>
- </h1>
- <p>
8.Put these three pieces in order so that they make one correct paragraph element.
- <p>
- Good morning
- </p>
Answer key — Year 7 Computing — Reading HTML tags
- 1. Arena
- 2. </p>
- 3. c) <b><i>Hi</i></b>
- 4. <p> → A paragraph of writing; <h1> → A large heading; <ul> → A list with bullet points; <li> → One single item in a list; <b> → Writing in bold
- 5. d) </h1>
- 6. c) Keep applying that tag to everything after it
- 7. <p> → Opening tag; </p> → Closing tag; <h1> → Opening tag; </h1> → Closing tag; <li> → Opening tag; </li> → Closing tag
- 8. 1. <p> 2. Good morning 3. </p>