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.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="150"> (a) bus.jpg (b) An old fort (c) Our school bus (d) width -
2.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>My best friend</p>
<h3>Good morning!</h3>
<p>Rain today</p> -
3.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Mango</li>
<li>Orange</li>
</ul> - 4.True or false: HTML on its own cannot make a form. (a) False (b) True
- 5.Which of these goes in the head? (a) <ul> (b) <table> (c) <h1> (d) <link rel="stylesheet">
-
6.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) Match report (b) index.html (c) Riya’s Recipes (d) I like to read. - 7.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 8.Which of these is true of a web browser? (a) sends pages over the net (b) saves our .html files (c) opens web pages for us (d) hosts websites online
- 9.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as one space (d) as 5 spaces
- 10.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) editor (d) attribute
-
11.🔗 Which address opens when you click this link?
<a href="news.html">Play games</a> (a) quiz.html (b) games.html (c) Play games (d) news.html - 12.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
- 13.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
14.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h2>Cricket is fun.</h2>
<p>Rain today</p>
<p>The red kite</p>
<h2>I love mangoes.</h2> -
15.🔗 Which address opens when you click this link?
<a href="contact.html">Take the quiz</a> (a) maths.html (b) https://example.com (c) Take the quiz (d) contact.html -
16.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="400"> (a) moon.png (b) Birthday cake (c) dog.jpg (d) cake.jpg -
17.🔍 One closing tag is missing. Which one?
<u>Fun facts</u>
<h2>My best friend</h2>
<strong>Hello, world! (a) </u> (b) </em> (c) </h2> (d) </strong> -
18.🔗 Which words do you click on?
<a href="quiz.html">Maths fun</a> (a) href (b) Maths fun (c) Art corner (d) quiz.html - 19.📄 Can HTML on its own show paragraphs? (a) No (b) Yes
- 20.Which of these is true of a web browser? (a) is where we type code (b) answers page requests (c) stores a website’s files (d) shows pages from the web
- 21.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h3> or <h5>? (a) <h4> (b) <h3> (c) <h5> (d) <h2>
-
22.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Our school trip</p>
<!-- <p>Hello, world!</p> --> (a) Our school trip (b) Hello, world! (c) My best friend - 23.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h6>? (a) <h5> (b) <h2> (c) <h1> (d) <h6>
- 24.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h5> or <h1>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
-
25.🔗 Which words do you click on?
<a href="news.html">Contact us</a> (a) href (b) news.html (c) Contact us (d) Visit the site - 26.🔍 Which is the odd one out? (a) turns HTML into a page (b) hosts websites online (c) opens web pages for us (d) shows pages from the web
-
27.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) Birthday cake (b) cake.jpg (c) dog.jpg (d) moon.png - 28.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small/> (d) <small>
- 29.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) <html> (b) </html>
- 30.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
-
31.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Fun facts</p> -->
<p>Rain today</p>
<p>The red kite</p> - 32.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
-
33.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="50"> - 34.Which of these goes in the body? (a) <img> (b) <meta charset="utf-8"> (c) <title> (d) <link rel="stylesheet">
-
35.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Jamun</li>
<li>Mango</li>
</ol> (a) bullets (b) numbers -
36.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Hello, world!</h2>
<h2>The red kite</h2>
<p>Hello, world!</p> - 37.True or false: <h1> goes in the body. (a) False (b) True
- 38.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour
- 39.Which of these is an opening tag? (a) </title> (b) </li> (c) <li> (d) </h1>
- 40.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) shows pages from the web (d) hosts websites online
Answer key
- Our school bus
- 2
- 5
- False
- <link rel="stylesheet">
- Riya’s Recipes
- No
- opens web pages for us
- as one space
- element
- news.html
- <a>
- a closing tag
- 3
- contact.html
- cake.jpg
- </strong>
- Maths fun
- Yes
- shows pages from the web
- <h2>
- Hello, world!
- <h6>
- <h1>
- Contact us
- hosts websites online
- cake.jpg
- </small>
- <html>
- in the body
- 2
- in the head
- 50
- <img>
- numbers
- 2
- True
- to leave notes
- <li>
- shows pages from the web
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids