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.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>The red kite</p>
<p>Fun facts</p>
<!-- <p>Hello, world!</p> --> (a) Hello, world! (b) Good morning! (c) The red kite (d) Fun facts -
2.🔗 Where does this link open?
<a href="quiz.html">Contact us</a> (a) in a new tab (b) in the same tab - 3.🏷️ HTML marks up text using ___. (a) pixels (b) keys (c) wires (d) tags
- 4.True or false: a web browser hosts websites online. (a) True (b) False
- 5.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 6.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
- 7.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
-
8.🔗 Which address opens when you click this link?
<a href="quiz.html">School news</a> (a) quiz.html (b) games.html (c) about.html (d) School news -
9.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>My best friend</h3>
<p>The red kite</p> -
10.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Sky is blue</p> -
11.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Hello, world!</p>
<p>Our school trip</p>
<!-- <p>Cricket is fun.</p> --> - 12.True or false: <ol> is an ordered list. (a) True (b) False
- 13.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h4>? (a) <h2> (b) <h4> (c) <h1> (d) <h5>
-
14.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>Fun facts</p> --> - 15.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <link> (d) <img>
- 16.🔗 Which attribute holds the address of a link? (a) src (b) id (c) alt (d) href
- 17.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) </html>
-
18.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>My pets</p>
<p>I love mangoes.</p>
<p>My pets</p>
<h2>Rain today</h2>
<h2>Our school trip</h2> - 19.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h5> or <h2>? (a) <h6> (b) <h2> (c) <h4> (d) <h5>
- 20.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) <h2> (c) <\h2> (d) </h2>
- 21.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour
- 22.Which of these goes in the head? (a) <ul> (b) <a> (c) <link rel="stylesheet"> (d) <p>
- 23.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 24.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) HyperText (c) High Tech (d) Home Text
-
25.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Stars shine<br>Sky is blue</p> -
26.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h3>Good morning!</h3>
<h4>My best friend</h4>
<h4>Hello, world!</h4> - 27.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
- 28.True or false: <ol> is an unordered list. (a) True (b) False
- 29.True or false: a web browser is where we type code. (a) True (b) False
- 30.True or false: HTML on its own cannot run a game loop. (a) True (b) False
- 31.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 10 (c) 6 (d) 1
- 32.True or false: <img> has a closing tag. (a) True (b) False
- 33.True or false: a code editor answers page requests. (a) False (b) True
- 34.True or false: in <img>, width shows if the image fails. (a) False (b) True
-
35.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) Easy snacks (b) Try this poha. (c) index.html (d) Art Gallery -
36.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>My best friend</p>
<!-- <p>Hello, world!</p> --> (a) My pets (b) Hello, world! (c) My best friend - 37.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
-
38.🔗 Which words do you click on?
<a href="games.html">Take the quiz</a> (a) href (b) games.html (c) Take the quiz (d) Play games -
39.🔗 Which address opens when you click this link?
<a href="https://example.com">Play games</a> (a) Play games (b) art.html (c) maths.html (d) https://example.com - 40.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server
Answer key
- Hello, world!
- in the same tab
- tags
- False
- has a closing tag
- in the body
- <ul>
- quiz.html
- 2
- 3
- 3
- True
- <h1>
- 1
- <a>
- href
- </html>
- 4
- <h2>
- </h2>
- to leave notes
- <link rel="stylesheet">
- in the body
- HyperText
- 3
- 4
- a code editor
- False
- False
- True
- 1
- False
- False
- False
- Art Gallery
- Hello, world!
- Yes
- Take the quiz
- https://example.com
- a web browser
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids