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 one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
-
2.🔍 Which line is missing its closing tag?
line 1: <h2>Hello, world!</h2>
line 2: <p>The red kite
line 3: <small>Cricket is fun.</small> (a) line 1 (b) line 3 (c) line 2 -
3.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high<br>Stars shine<br>Rivers flow</p> - 4.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <img> (d) <p>
-
5.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Good morning!</p>
<h2>My best friend</h2>
<h2>I love mangoes.</h2> - 6.True or false: <h1> is an empty tag. (a) False (b) True
- 7.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 8.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h6> or <h5>? (a) <h5> (b) <h1> (c) <h6> (d) <h4>
- 9.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to add colour (d) to leave notes
-
10.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) games.html (b) Play games (c) href (d) About us - 11.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
- 12.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
- 13.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
14.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>The red kite</p>
<!-- <p>Our school trip</p> -->
<p>Rain today</p> (a) Good morning! (b) Rain today (c) The red kite (d) Our school trip - 15.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h6>? (a) <h3> (b) <h1> (c) <h6> (d) <h5>
-
16.🔗 Which words do you click on?
<a href="contact.html">Art corner</a> (a) contact.html (b) Art corner (c) href (d) School news - 17.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) editor (d) element
-
18.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) All about me (b) I like to read. (c) Cricket Club (d) index.html -
19.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Kites fly high<br>Birds sing<br>Roses are red<br>Sky is blue</p> - 20.True or false: in <img>, src is read by screen readers. (a) False (b) True
- 21.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
- 22.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h6>? (a) <h5> (b) <h1> (c) <h6> (d) <h3>
- 23.True or false: HTML on its own can show paragraphs. (a) True (b) False
- 24.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h5> or <h1>? (a) <h4> (b) <h6> (c) <h5> (d) <h1>
-
25.🔗 Which address opens when you click this link?
<a href="maths.html">Visit the site</a> (a) Visit the site (b) news.html (c) art.html (d) maths.html - 26.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
-
27.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine<br>Kites fly high<br>Birds sing</p> -
28.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) A tiger asleep (b) A red kite (c) width (d) tiger.jpg - 29.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the body (d) the head
- 30.📝 What does <hr> draw? (a) a picture (b) a table (c) a link (d) a line across the page
- 31.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h6> (d) <h1>
- 32.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
33.🔍 Which line is missing its closing tag?
line 1: <b>Cricket is fun.</b>
line 2: <h3>Good morning!</h3>
line 3: <em>Fun facts (a) line 1 (b) line 2 (c) line 3 - 34.🌐 Which one stores a website’s files? (a) a code editor (b) a web server (c) a web browser
- 35.Which of these is true of a web browser? (a) shows line numbers (b) answers page requests (c) opens web pages for us (d) stores a website’s files
- 36.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) href (d) id
-
37.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p>
<p>My best friend</p>
<p>My pets</p> - 38.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
39.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>The red kite</p> -->
<p>Fun facts</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Hello, world!</p> --> -
40.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>Hello, world!</p>
<!-- <p>Good morning!</p> -->
<p>My best friend</p>
<p>Rain today</p>
Answer key
- a web server
- line 2
- 4
- <a>
- 2
- False
- has a closing tag
- <h6>
- to leave notes
- Play games
- a slash /
- as one space
- an opening tag
- Our school trip
- <h6>
- Art corner
- element
- Cricket Club
- 5
- False
- a web browser
- <h1>
- True
- <h1>
- maths.html
- <ol>
- 4
- A tiger asleep
- the body
- a line across the page
- <h6>
- an opening tag
- line 3
- a web server
- opens web pages for us
- href
- 3
- Yes
- 2
- 4
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids