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.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) element (d) address
- 2.🏷️ Which is the closing tag for <u>? (a) </u> (b) <u/> (c) <\u> (d) <u>
- 3.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Laptop (d) Language
-
4.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p>
<p>Hello, world!</p>
<p>Fun facts</p> (a) Fun facts (b) I love mangoes. (c) Hello, world! (d) Good morning! -
5.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>Fun facts</h2>
<p>Cricket is fun.</p>
<p>The red kite</p> -
6.🔗 Which address opens when you click this link?
<a href="news.html">Play games</a> (a) Play games (b) news.html (c) games.html (d) quiz.html - 7.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i/> (c) </i> (d) <i>
- 8.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
- 9.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dollar $ (d) a dot .
-
10.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>My best friend</p>
<!-- <p>I love mangoes.</p> --> (a) The red kite (b) My best friend (c) I love mangoes. - 11.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h6> or <h5>? (a) <h6> (b) <h5> (c) <h3> (d) <h1>
- 12.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <\h2> (c) <h2/> (d) <h2>
- 13.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
14.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>I love mangoes.</p>
<p>Hello, world!</p>
<p>Good morning!</p> -
15.🔍 Which line is missing its closing tag?
line 1: <p>Hello, world!</p>
line 2: <em>Cricket is fun.</em>
line 3: <i>I love mangoes. (a) line 1 (b) line 2 (c) line 3 -
16.🔍 Which line is missing its closing tag?
line 1: <b>I love mangoes.</b>
line 2: <strong>Rain today
line 3: <h2>Cricket is fun.</h2> (a) line 3 (b) line 2 (c) line 1 - 17.Which of these is true of a code editor? (a) answers page requests (b) has an address bar (c) saves our .html files (d) stores a website’s files
- 18.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
-
19.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Stars shine<br>Roses are red<br>Rivers flow<br>Birds sing</p> -
20.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Birds sing<br>Stars shine</p> -
21.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="150"> (a) The full moon (b) bus.jpg (c) fort.jpg (d) moon.png -
22.🔗 Which words do you click on?
<a href="games.html">Take the quiz</a> (a) href (b) Play games (c) Take the quiz (d) games.html - 23.True or false: <ul> goes in the head. (a) True (b) False
-
24.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>My pets</p>
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p>
<!-- <p>Hello, world!</p> --> -
25.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>My pets</p>
<h2>My best friend</h2>
<h2>Our school trip</h2> -
26.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="400"> (a) A happy dog (b) dog.jpg (c) bus.jpg (d) moon.png - 27.Which of these has a closing tag? (a) <meta> (b) <br> (c) <hr> (d) <h1>
- 28.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 29.Which of these is true of a web browser? (a) sends pages over the net (b) opens web pages for us (c) colours code to help us (d) is where we type code
- 30.True or false: a web browser has an address bar. (a) False (b) True
- 31.📋 Which list tag is an ordered list? (a) <ul> (b) <ol> (c) <li>
- 32.💬 Does the browser show comments on the page? (a) Yes (b) No
- 33.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h3> or <h1>? (a) <h4> (b) <h2> (c) <h1> (d) <h3>
- 34.🔗 Which code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a src="about.html"> (d) <a alt="about.html">
-
35.🔗 Which words do you click on?
<a href="quiz.html">Play games</a> (a) About us (b) Play games (c) quiz.html (d) href - 36.💾 A web page file usually ends with which extension? (a) .png (b) .html (c) .mp3 (d) .txt
-
37.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high<br>Birds sing</p> -
38.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>My pets</p>
<!-- <p>Good morning!</p> --> (a) I love mangoes. (b) Good morning! (c) My pets (d) Hello, world! -
39.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Fun facts</p>
<p>My best friend</p> - 40.True or false: HTML on its own cannot run a game loop. (a) True (b) False
Answer key
- element
- </u>
- Language
- I love mangoes.
- 2
- news.html
- </i>
- <ul>
- a slash /
- I love mangoes.
- <h1>
- </h2>
- No
- 1
- line 3
- line 2
- saves our .html files
- <ol>
- 5
- 3
- moon.png
- Take the quiz
- False
- 3
- 2
- dog.jpg
- <h1>
- an empty tag
- opens web pages for us
- True
- <ol>
- No
- <h1>
- <a href="about.html">
- Play games
- .html
- 3
- Good morning!
- 2
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids