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 browser? (a) answers page requests (b) sends pages over the net (c) opens web pages for us (d) is where we type code
- 2.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
-
3.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h2>My pets</h2>
<h2>I love mangoes.</h2> -
4.🔍 Which line is missing its closing tag?
line 1: <strong>My best friend</strong>
line 2: <h1>Our school trip</h1>
line 3: <u>Rain today (a) line 1 (b) line 2 (c) line 3 - 5.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
-
6.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="400"> (a) Map of India (b) cake.jpg (c) map.png (d) dog.jpg - 7.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 8.💬 Does the browser show comments on the page? (a) No (b) Yes
- 9.📝 What does <p> make? (a) a table (b) a picture (c) a paragraph (d) a link
- 10.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
-
11.🔗 Where does this link open?
<a href="quiz.html">Contact us</a> (a) in a new tab (b) in the same tab -
12.🔗 Which words do you click on?
<a href="contact.html">School news</a> (a) Take the quiz (b) href (c) School news (d) contact.html - 13.True or false: a web server shows line numbers. (a) True (b) False
- 14.Which of these is an opening tag? (a) </p> (b) </title> (c) </body> (d) <p>
- 15.📄 Where does the text of <title> appear? (a) in a big heading (b) at the bottom (c) nowhere (d) on the browser tab
-
16.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) Welcome! (b) body (c) My Hobbies (d) Mars is red. -
17.🔗 Which address opens when you click this link?
<a href="quiz.html">Take the quiz</a> (a) Take the quiz (b) about.html (c) quiz.html (d) games.html - 18.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <br> (c) <ul> (d) <hr>
- 19.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
-
20.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Rain today</p>
<p>The red kite</p> -
21.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) Visit the site (b) href (c) Maths fun (d) news.html - 22.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
- 23.True or false: HTML on its own cannot make a form. (a) True (b) False
- 24.Which of these is an opening tag? (a) </b> (b) </title> (c) </body> (d) <title>
- 25.True or false: <ol> is an ordered list. (a) True (b) False
-
26.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<p>Rain today</p>
<p>The red kite</p> (a) Cricket is fun. (b) The red kite (c) Good morning! (d) Rain today - 27.Which of these goes in the head? (a) <title> (b) <p> (c) <table> (d) <a>
- 28.True or false: in <img>, alt sets how wide it is. (a) True (b) False
-
29.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="350"> (a) cake.jpg (b) A red kite (c) kite.png (d) map.png - 30.🔍 Which is the odd one out? (a) has an address bar (b) answers page requests (c) sends pages over the net (d) hosts websites online
-
31.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="100"> (a) moon.png (b) fort.jpg (c) bus.jpg (d) The full moon -
32.🔗 Where does this link open?
<a href="contact.html" target="_blank">Maths fun</a> (a) in a new tab (b) in the same tab - 33.Which of these is true of a web server? (a) turns HTML into a page (b) has an address bar (c) opens web pages for us (d) sends pages over the net
-
34.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>I love mangoes.</p>
<p>The red kite</p>
<h2>My best friend</h2>
<p>Hello, world!</p>
<p>The red kite</p> - 35.True or false: in <img>, alt describes the picture. (a) True (b) False
- 36.Which of these has a closing tag? (a) <input> (b) <hr> (c) <br> (d) <ul>
- 37.True or false: <img> goes in the head. (a) True (b) False
- 38.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
39.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) href (b) Contact us (c) Visit the site (d) games.html - 40.🔍 Which is the odd one out? (a) stores a website’s files (b) shows line numbers (c) colours code to help us (d) saves our .html files
Answer key
- opens web pages for us
- <ul>
- 3
- line 3
- opens it in a new tab
- map.png
- a closing tag
- No
- a paragraph
- <a>
- in the same tab
- School news
- False
- <p>
- on the browser tab
- Welcome!
- quiz.html
- <ol>
- <ol>
- 3
- Visit the site
- <img>
- False
- <title>
- True
- Good morning!
- <title>
- False
- kite.png
- has an address bar
- moon.png
- in a new tab
- sends pages over the net
- 5
- True
- <ul>
- False
- a closing tag
- Contact us
- stores a website’s files
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids