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.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Rivers flow<br>Birds sing<br>Sky is blue<br>Roses are red</p> - 2.Which of these is true of a code editor? (a) is where we type code (b) answers page requests (c) hosts websites online (d) stores a website’s files
-
3.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Rain today</p>
<p>My pets</p> - 4.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </body> (c) </html> (d) <head>
- 5.📄 Which part holds everything you see on the page? (a) the doctype (b) the body (c) the head (d) the title
-
6.🔍 One closing tag is missing. Which one?
<strong>Fun facts</strong>
<h1>The red kite</h1>
<em>Good morning! (a) </em> (b) </strong> (c) </h1> (d) </b> - 7.Which of these is a closing tag? (a) <li> (b) <body> (c) </b> (d) <h1>
-
8.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="150"> (a) An old fort (b) bus.jpg (c) Our school bus (d) width -
9.🔗 Which address opens when you click this link?
<a href="art.html">Maths fun</a> (a) Maths fun (b) quiz.html (c) art.html (d) news.html -
10.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="300"> - 11.True or false: <li> shows 1, 2, 3 numbers. (a) True (b) False
- 12.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h6>? (a) <h3> (b) <h4> (c) <h6> (d) <h1>
- 13.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 14.Which of these is an opening tag? (a) </li> (b) </p> (c) <li> (d) </h1>
- 15.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
- 16.🌐 Which one answers page requests? (a) a web server (b) a code editor (c) a web browser
- 17.🔍 Which is the odd one out? (a) shows pages from the web (b) turns HTML into a page (c) opens web pages for us (d) colours code to help us
-
18.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue</p> -
19.🔗 Which words do you click on?
<a href="quiz.html">Take the quiz</a> (a) Play games (b) href (c) quiz.html (d) Take the quiz - 20.🏷️ Which is the closing tag for <h2>? (a) </h2> (b) <\h2> (c) <h2/> (d) <h2>
- 21.True or false: <li> is an empty tag. (a) True (b) False
- 22.🔠 Which tag is the least important heading? (a) <h3> (b) <h1> (c) <p> (d) <h6>
-
23.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> (a) width (b) A tiger asleep (c) tiger.jpg (d) A red kite - 24.🔢 In a basic web page file, which comes first: “</html>” or “</body>”? (a) </html> (b) </body>
- 25.📝 What does <hr> draw? (a) a line across the page (b) a picture (c) a table (d) a link
- 26.🔢 In a basic web page file, which comes first: “<html>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) <html>
- 27.Which of these is a closing tag? (a) <li> (b) <h1> (c) <body> (d) </li>
- 28.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
-
29.🔍 Which line is missing its closing tag?
line 1: <i>Cricket is fun.
line 2: <h2>Good morning!</h2>
line 3: <strong>Our school trip</strong> (a) line 2 (b) line 3 (c) line 1 -
30.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Good morning!</p>
<p>Cricket is fun.</p> -
31.🔗 Where does this link open?
<a href="contact.html">Maths fun</a> (a) in the same tab (b) in a new tab -
32.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Guava</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Grapes</li>
</ul> -
33.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>Good morning!</p>
<p>Hello, world!</p>
<h2>My pets</h2> - 34.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
-
35.🔗 Which words do you click on?
<a href="games.html">Visit the site</a> (a) Maths fun (b) Visit the site (c) games.html (d) href -
36.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>The red kite</p>
<p>Rain today</p>
<p>The red kite</p> - 37.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
- 38.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) Hot Tags (c) HyperText (d) Home Text
- 39.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) makes it blank (d) opens it in a new tab
-
40.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="400">
Answer key
- 5
- is where we type code
- 1
- </html>
- the body
- </em>
- </b>
- Our school bus
- art.html
- 300
- False
- <h6>
- in the head
- <li>
- on the browser tab
- a web server
- colours code to help us
- 2
- Take the quiz
- </h2>
- False
- <h6>
- A tiger asleep
- </body>
- a line across the page
- <!DOCTYPE html>
- </li>
- in the body
- line 1
- 2
- in the same tab
- 5
- 3
- <a>
- Visit the site
- 4
- No
- HyperText
- opens it in a new tab
- 400
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids