HTML Worksheet: Practice Test
Code tip (Read the code like a browser): Find the topic of the question: tags, headings, lists, links, images, structure or comments. Read the code line by line, the way a browser would. Count carefully: tags opened and closed, items, lines, paragraphs.
NameDateTime takenScore ___ / 40
- 1.📝 What does <hr> draw? (a) a line across the page (b) a link (c) a picture (d) a table
- 2.Which of these is an opening tag? (a) <body> (b) </body> (c) </li> (d) </b>
- 3.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 4.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
- 5.🏷️ Which is the closing tag for <u>? (a) <u> (b) <u/> (c) </u> (d) <\u>
-
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) The full moon (b) A happy dog (c) width (d) dog.jpg - 7.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
8.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h2>Cricket is fun.</h2>
<p>The red kite</p>
<h2>Fun facts</h2> - 9.True or false: a web browser turns HTML into a page. (a) True (b) False
- 10.📝 Does <b> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 11.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 12.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
- 13.🔠 How many heading levels does HTML have? (a) 4 (b) 10 (c) 3 (d) 6
- 14.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
-
15.🔗 Which address opens when you click this link?
<a href="https://example.com">School news</a> (a) art.html (b) School news (c) maths.html (d) https://example.com - 16.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
- 17.Which of these goes in the head? (a) <img> (b) <h1> (c) <title> (d) <p>
-
18.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Maths fun</a> (a) in a new tab (b) in the same tab - 19.📝 Does <img> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
20.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<p>Rain today</p> - 21.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
- 22.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
- 23.💬 How does an HTML comment start? (a) # (b) /* (c) // (d) <!--
- 24.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 25.Which of these has a closing tag? (a) <br> (b) <b> (c) <hr> (d) <meta>
- 26.True or false: a code editor stores a website’s files. (a) False (b) True
- 27.Which of these is true of a web browser? (a) stores a website’s files (b) saves our .html files (c) has an address bar (d) answers page requests
- 28.True or false: a code editor shows pages from the web. (a) False (b) True
- 29.🔍 Which is the odd one out? (a) colours code to help us (b) shows pages from the web (c) has an address bar (d) opens web pages for us
- 30.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) height (c) width (d) src
- 31.📛 In <a href="x.html">, what is href? (a) an attribute (b) a comment (c) a closing tag (d) an element name
- 32.🔤 In “HTML”, what does the L stand for? (a) Link (b) Language (c) Line (d) Laptop
- 33.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) element (d) address
-
34.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>My best friend</p>
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> --> (a) Our school trip (b) Fun facts (c) I love mangoes. (d) My best friend - 35.True or false: <img> has a closing tag. (a) False (b) True
- 36.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h6> or <h4>? (a) <h6> (b) <h4> (c) <h2> (d) <h1>
- 37.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) alt (d) width
-
38.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> --> (a) Good morning! (b) Cricket is fun. (c) My pets - 39.Which of these is true of a code editor? (a) sends pages over the net (b) has an address bar (c) saves our .html files (d) answers page requests
- 40.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
Answer key
- a line across the page
- <body>
- an empty tag
- opens it in a new tab
- </u>
- A happy dog
- Yes
- 3
- True
- has a closing tag
- Yes
- in the head
- 6
- <ol>
- https://example.com
- <ul>
- <title>
- in a new tab
- an empty tag
- 2
- <h6>
- <ol>
- <!--
- a closing tag
- <b>
- False
- has an address bar
- False
- colours code to help us
- src
- an attribute
- Language
- element
- Our school trip
- False
- <h1>
- src
- Cricket is fun.
- saves our .html files
- in the body
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids