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 of these is true of a web server? (a) shows pages from the web (b) sends pages over the net (c) saves our .html files (d) shows line numbers
- 2.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 3.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 4.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h5>? (a) <h4> (b) <h2> (c) <h5> (d) <h3>
-
5.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Rain today</p>
<p>My best friend</p> -
6.🔗 Where does this link open?
<a href="about.html">Play games</a> (a) in the same tab (b) in a new tab -
7.🔗 Where does this link open?
<a href="quiz.html">Art corner</a> (a) in the same tab (b) in a new tab - 8.Which of these is true of a web server? (a) turns HTML into a page (b) is where we type code (c) opens web pages for us (d) hosts websites online
- 9.🌐 Which one is where we type code? (a) a web browser (b) a code editor (c) a web server
- 10.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
11.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> -->
<p>Hello, world!</p> - 12.🔍 Which is the odd one out? (a) has an address bar (b) stores a website’s files (c) answers page requests (d) sends pages over the net
- 13.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
-
14.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high</p> - 15.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
-
16.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow</p> - 17.True or false: <li> shows bullet points. (a) False (b) True
- 18.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dollar $ (c) a hash # (d) a dot .
- 19.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) alt (d) src
- 20.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) address (d) element
-
21.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h3>Cricket is fun.</h3>
<h4>Fun facts</h4>
<p>Cricket is fun.</p>
<h4>Hello, world!</h4> - 22.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <!DOCTYPE html> (b) <head>
- 23.🔍 Which is the odd one out? (a) saves our .html files (b) sends pages over the net (c) colours code to help us (d) is where we type code
-
24.🔍 One closing tag is missing. Which one?
<i>Cricket is fun.
<em>Hello, world!</em>
<small>Good morning!</small> (a) </i> (b) </em> (c) </small> (d) </b> - 25.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
- 26.True or false: <b> is an empty tag. (a) False (b) True
- 27.🖼️ Which tag puts a picture on a page? (a) <p> (b) <a> (c) <img> (d) <pic>
- 28.🌐 Which one turns HTML into a page? (a) a web browser (b) a web server (c) a code editor
- 29.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
30.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>The red kite</p>
<h4>Good morning!</h4>
<p>My pets</p> - 31.True or false: HTML on its own cannot make tables. (a) False (b) True
- 32.🖼️ Which attribute of <img> describes the picture? (a) width (b) src (c) alt (d) height
-
33.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) A tiger asleep (b) map.png (c) tiger.jpg (d) kite.png - 34.Which of these is a closing tag? (a) <title> (b) <p> (c) </li> (d) <body>
- 35.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <head> (c) <body> (d) <!DOCTYPE html>
- 36.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 37.🔍 Which is the odd one out? (a) stores a website’s files (b) has an address bar (c) turns HTML into a page (d) opens web pages for us
- 38.💬 How does an HTML comment start? (a) /* (b) # (c) <!-- (d) //
- 39.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) an attribute (d) a closing tag
- 40.🔤 In “HTML”, what does the L stand for? (a) Line (b) Language (c) Link (d) Laptop
Answer key
- sends pages over the net
- in the head
- <ul>
- <h2>
- 2
- in the same tab
- in the same tab
- hosts websites online
- a code editor
- has a closing tag
- 2
- has an address bar
- <ol>
- 2
- <!DOCTYPE html>
- 2
- False
- a slash /
- alt
- element
- 4
- <!DOCTYPE html>
- sends pages over the net
- </i>
- False
- False
- <img>
- a web browser
- has a closing tag
- 2
- False
- alt
- tiger.jpg
- </li>
- <!DOCTYPE html>
- Yes
- stores a website’s files
- <!--
- an attribute
- Language
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids