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.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) attribute (c) editor (d) element
- 2.Which of these is a closing tag? (a) <h1> (b) <b> (c) <p> (d) </h1>
- 3.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a new line (d) as a dot
-
4.🔗 Which address opens when you click this link?
<a href="news.html">About us</a> (a) games.html (b) quiz.html (c) About us (d) news.html - 5.True or false: <title> has a closing tag. (a) True (b) False
- 6.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h1>? (a) <h2> (b) <h4> (c) <h5> (d) <h1>
- 7.💬 How does an HTML comment end? (a) --> (b) // (c) >> (d) */
-
8.🔍 Which line is missing its closing tag?
line 1: <h2>Hello, world!</h2>
line 2: <h1>My pets</h1>
line 3: <h3>The red kite (a) line 1 (b) line 3 (c) line 2 - 9.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
- 10.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 11.Which of these is an empty tag? (a) <ul> (b) <br> (c) <p> (d) <title>
-
12.🔗 Which words do you click on?
<a href="games.html">About us</a> (a) href (b) games.html (c) Contact us (d) About us - 13.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
14.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>My best friend</p>
<p>Good morning!</p> -
15.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Orange</li>
<li>Mango</li>
</ul> (a) bullets (b) numbers -
16.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="200"> (a) Map of India (b) cake.jpg (c) dog.jpg (d) map.png - 17.True or false: <ul> lists steps in order. (a) False (b) True
- 18.True or false: <img> is an empty tag. (a) False (b) True
- 19.True or false: <hr> is an empty tag. (a) True (b) False
-
20.🔍 Which line is missing its closing tag?
line 1: <h3>Fun facts
line 2: <small>Good morning!</small>
line 3: <strong>Cricket is fun.</strong> (a) line 2 (b) line 3 (c) line 1 - 21.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
- 22.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <head> (c) <body> (d) </head>
- 23.📝 What does <br> do? (a) starts a new line (b) makes a list (c) makes text bold (d) adds a picture
-
24.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="350"> (a) kite.png (b) cake.jpg (c) A red kite (d) map.png -
25.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>Good morning!</h2>
<p>Good morning!</p>
<h4>I love mangoes.</h4> -
26.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>My pets</p>
<h3>The red kite</h3>
<h4>Fun facts</h4>
<h2>Rain today</h2> - 27.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
-
28.🔍 Which line is missing its closing tag?
line 1: <em>Good morning!</em>
line 2: <h3>Cricket is fun.
line 3: <h2>Hello, world!</h2> (a) line 3 (b) line 1 (c) line 2 - 29.🌐 Which one shows line numbers? (a) a code editor (b) a web server (c) a web browser
- 30.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to add colour (d) to make links
- 31.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
- 32.Which of these goes in the head? (a) <img> (b) <a> (c) <meta charset="utf-8"> (d) <p>
-
33.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h4>My best friend</h4>
<h3>Hello, world!</h3>
<p>Fun facts</p> - 34.🌐 Which one sends pages over the net? (a) a code editor (b) a web browser (c) a web server
- 35.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h1> or <h5>? (a) <h4> (b) <h5> (c) <h1> (d) <h3>
- 36.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 37.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <!DOCTYPE html> (d) <html>
- 38.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h3>? (a) <h3> (b) <h6> (c) <h5> (d) <h1>
-
39.🔍 Which line is missing its closing tag?
line 1: <small>Cricket is fun.</small>
line 2: <p>My best friend</p>
line 3: <strong>Good morning! (a) line 2 (b) line 1 (c) line 3 - 40.📝 What does <hr> draw? (a) a picture (b) a link (c) a line across the page (d) a table
Answer key
- element
- </h1>
- as one space
- news.html
- True
- <h1>
- -->
- line 3
- Yes
- a closing tag
- <br>
- About us
- Yes
- 2
- bullets
- map.png
- False
- True
- True
- line 1
- <h6>
- <!DOCTYPE html>
- starts a new line
- kite.png
- 3
- 4
- in the head
- line 2
- a code editor
- to leave notes
- Markup
- <meta charset="utf-8">
- 3
- a web server
- <h1>
- a closing tag
- <!DOCTYPE html>
- <h1>
- line 3
- a line across the page
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids