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 is the odd one out? (a) shows pages from the web (b) answers page requests (c) opens web pages for us (d) turns HTML into a page
-
2.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Cricket is fun.</p>
<p>Rain today</p>
<!-- <p>Hello, world!</p> --> - 3.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 6 (d) 10
- 4.True or false: <br> has a closing tag. (a) True (b) False
-
5.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p>
<p>Fun facts</p> (a) I love mangoes. (b) Our school trip (c) Fun facts - 6.Which of these is an opening tag? (a) <li> (b) </h1> (c) </title> (d) </body>
- 7.True or false: HTML on its own can count button clicks. (a) False (b) True
- 8.Which of these is true of a code editor? (a) answers page requests (b) turns HTML into a page (c) is where we type code (d) shows pages from the web
-
9.🔍 One closing tag is missing. Which one?
<h2>Our school trip
<em>I love mangoes.</em>
<u>Hello, world!</u> (a) </em> (b) </p> (c) </h2> (d) </u> - 10.🔤 In “HTML”, what does the L stand for? (a) Link (b) Language (c) Line (d) Laptop
- 11.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 12.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) editor (c) address (d) attribute
- 13.True or false: in <img>, src shows if the image fails. (a) False (b) True
-
14.🔍 Which line is missing its closing tag?
line 1: <p>My best friend</p>
line 2: <small>I love mangoes.</small>
line 3: <h2>Fun facts (a) line 1 (b) line 2 (c) line 3 -
15.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>My best friend</p>
<h2>Our school trip</h2>
<p>Hello, world!</p>
<p>My pets</p>
<h2>My pets</h2> -
16.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="150"> (a) width (b) A happy dog (c) Birthday cake (d) cake.jpg - 17.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <img> (d) <p>
-
18.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>My pets</p>
<h4>Rain today</h4>
<h4>Rain today</h4> - 19.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
20.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Our school trip</p>
<p>Rain today</p>
<p>My best friend</p>
<p>My best friend</p>
<h2>Good morning!</h2> -
21.🔗 Which address opens when you click this link?
<a href="about.html">Visit the site</a> (a) about.html (b) Visit the site (c) contact.html (d) https://example.com -
22.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) A tiger asleep (b) width (c) tiger.jpg (d) A red kite - 23.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
- 24.🔍 Which is the odd one out? (a) stores a website’s files (b) hosts websites online (c) sends pages over the net (d) saves our .html files
- 25.True or false: <ol> is an unordered list. (a) False (b) True
-
26.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red</p> -
27.🔍 One closing tag is missing. Which one?
<u>My best friend</u>
<strong>Fun facts</strong>
<h2>My pets (a) </u> (b) </small> (c) </strong> (d) </h2> -
28.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h3>My pets</h3>
<h3>My pets</h3> - 29.Which of these is true of a web server? (a) saves our .html files (b) colours code to help us (c) stores a website’s files (d) opens web pages for us
-
30.🔍 One closing tag is missing. Which one?
<em>Cricket is fun.
<p>My best friend</p>
<small>Good morning!</small> (a) </h1> (b) </p> (c) </small> (d) </em> - 31.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 32.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <title> (c) <link rel="stylesheet"> (d) <ul>
-
33.🔗 Where does this link open?
<a href="https://example.com">Art corner</a> (a) in a new tab (b) in the same tab - 34.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
-
35.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) maths.html (b) https://example.com (c) Play games (d) contact.html - 36.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 37.True or false: HTML on its own cannot make links to pages. (a) True (b) False
- 38.Which of these is an opening tag? (a) <h1> (b) </body> (c) </h1> (d) </p>
-
39.🔗 Which address opens when you click this link?
<a href="maths.html">Art corner</a> (a) news.html (b) Art corner (c) art.html (d) maths.html - 40.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
Answer key
- answers page requests
- 3
- 6
- False
- I love mangoes.
- <li>
- False
- is where we type code
- </h2>
- Language
- No
- element
- False
- line 3
- 4
- Birthday cake
- <img>
- 3
- Yes
- 5
- about.html
- A tiger asleep
- <a>
- saves our .html files
- False
- 2
- </h2>
- 3
- stores a website’s files
- </em>
- True
- <ul>
- in the same tab
- starts a new line
- contact.html
- an opening tag
- False
- <h1>
- maths.html
- in the head
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids