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) editor (b) address (c) attribute (d) element
- 2.📄 Can HTML on its own make headings? (a) Yes (b) No
- 3.True or false: <hr> is an empty tag. (a) False (b) True
- 4.Which of these has a closing tag? (a) <input> (b) <img> (c) <b> (d) <br>
- 5.🔠 How many heading levels does HTML have? (a) 3 (b) 10 (c) 4 (d) 6
- 6.🔍 Which is the odd one out? (a) is where we type code (b) colours code to help us (c) shows line numbers (d) turns HTML into a page
-
7.🔍 One closing tag is missing. Which one?
<b>Good morning!
<u>Hello, world!</u>
<h1>Our school trip</h1> (a) </u> (b) </h1> (c) </strong> (d) </b> - 8.📝 What does <p> make? (a) a table (b) a link (c) a paragraph (d) a picture
- 9.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
10.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) About us (b) https://example.com (c) Play games (d) href - 11.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h1> or <h3>? (a) <h2> (b) <h3> (c) <h5> (d) <h1>
- 12.True or false: in <img>, src names the picture file. (a) False (b) True
-
13.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>I love mangoes.</p>
<p>My pets</p>
<!-- <p>Our school trip</p> -->
<p>Good morning!</p> -
14.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="350"> (a) width (b) An old fort (c) fort.jpg (d) A tiger asleep - 15.Which of these is an empty tag? (a) <h1> (b) <input> (c) <p> (d) <ul>
- 16.🔍 Which is the odd one out? (a) is where we type code (b) has an address bar (c) saves our .html files (d) colours code to help us
-
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="300"> (a) cake.jpg (b) Birthday cake (c) width (d) A happy dog - 18.📄 Can HTML on its own pick a random number? (a) Yes (b) No
- 19.True or false: a web server sends pages over the net. (a) True (b) False
- 20.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 21.🔢 In a basic web page file, which comes first: “</html>” or “<head>”? (a) </html> (b) <head>
- 22.🔢 In a basic web page file, which comes first: “<body>” or “<html>”? (a) <body> (b) <html>
-
23.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) My Hobbies (b) Welcome! (c) body (d) Thanks for visiting. - 24.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) src (d) alt
- 25.🏷️ Which is the closing tag for <p>? (a) <\p> (b) <p/> (c) </p> (d) <p>
- 26.True or false: HTML on its own can count button clicks. (a) True (b) False
-
27.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue</p> -
28.🔍 One closing tag is missing. Which one?
<b>Rain today
<h3>Fun facts</h3>
<small>The red kite</small> (a) </h2> (b) </b> (c) </small> (d) </h3> -
29.🔍 One closing tag is missing. Which one?
<strong>I love mangoes.
<h2>Good morning!</h2>
<i>My pets</i> (a) </b> (b) </strong> (c) </i> (d) </h2> -
30.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>I love mangoes.</h2>
<p>Cricket is fun.</p>
<h2>My best friend</h2> -
31.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="250"> -
32.🔗 Which address opens when you click this link?
<a href="about.html">Play games</a> (a) contact.html (b) Play games (c) https://example.com (d) about.html - 33.Which of these is an opening tag? (a) </li> (b) </h1> (c) <li> (d) </p>
- 34.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
- 35.Which of these has a closing tag? (a) <img> (b) <meta> (c) <title> (d) <input>
-
36.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Hello, world!</p>
<h3>Fun facts</h3>
<h3>Cricket is fun.</h3>
<h2>Good morning!</h2> - 37.True or false: <li> has a closing tag. (a) True (b) False
- 38.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
-
39.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="250"> (a) A red kite (b) map.png (c) cake.jpg (d) kite.png - 40.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <!DOCTYPE html> (b) <html>
Answer key
- element
- Yes
- True
- <b>
- 6
- turns HTML into a page
- </b>
- a paragraph
- an opening tag
- Play games
- <h1>
- True
- 4
- An old fort
- <input>
- has an address bar
- Birthday cake
- No
- True
- an opening tag
- <head>
- <html>
- Welcome!
- width
- </p>
- False
- 2
- </b>
- </strong>
- 2
- 250
- about.html
- <li>
- a code editor
- <title>
- 4
- True
- in the body
- kite.png
- <!DOCTYPE html>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids