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 tag puts a picture on a page? (a) <a> (b) <p> (c) <img> (d) <pic>
- 2.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h5>? (a) <h3> (b) <h2> (c) <h5> (d) <h4>
- 3.🔍 Which is the odd one out? (a) shows line numbers (b) is where we type code (c) stores a website’s files (d) saves our .html files
- 4.True or false: <ul> is an ordered list. (a) False (b) True
- 5.🌐 Which one colours code to help us? (a) a web browser (b) a web server (c) a code editor
- 6.True or false: a web browser opens web pages for us. (a) False (b) True
- 7.True or false: <ul> is an empty tag. (a) False (b) True
-
8.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>My pets</p>
<p>Fun facts</p> - 9.Which of these is an opening tag? (a) </title> (b) </li> (c) </p> (d) <body>
-
10.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="250"> (a) bus.jpg (b) fort.jpg (c) Our school bus (d) tiger.jpg - 11.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ol> (d) <ul>
- 12.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h4>? (a) <h1> (b) <h3> (c) <h4> (d) <h2>
- 13.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) address (d) attribute
- 14.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
- 15.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “</head>”? (a) </head> (b) <!DOCTYPE html>
- 16.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
-
17.🔗 Which address opens when you click this link?
<a href="contact.html">Contact us</a> (a) https://example.com (b) contact.html (c) maths.html (d) Contact us -
18.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Roses are red</p> - 19.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
-
20.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Guava</li>
<li>Banana</li>
<li>Litchi</li>
</ul> - 21.💬 Why do coders write comments? (a) to show pictures (b) to add colour (c) to leave notes (d) to make links
- 22.Which of these is true of a web browser? (a) saves our .html files (b) answers page requests (c) is where we type code (d) has an address bar
- 23.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
- 24.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <html> (b) <!DOCTYPE html>
- 25.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
- 26.🏷️ HTML marks up text using ___. (a) keys (b) pixels (c) wires (d) tags
-
27.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>The red kite</p> -->
<p>Our school trip</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) Our school trip (c) The red kite (d) Hello, world! - 28.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h4> or <h1>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
- 29.Which of these is true of a code editor? (a) shows line numbers (b) answers page requests (c) turns HTML into a page (d) has an address bar
- 30.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h2>? (a) <h1> (b) <h3> (c) <h2> (d) <h5>
- 31.True or false: <title> has a closing tag. (a) True (b) False
-
32.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Our school trip</p>
<!-- <p>Hello, world!</p> --> (a) Good morning! (b) Hello, world! (c) Our school trip - 33.True or false: <br> has a closing tag. (a) True (b) False
- 34.True or false: HTML on its own can keep a high score. (a) False (b) True
-
35.🔗 Which address opens when you click this link?
<a href="games.html">Contact us</a> (a) Contact us (b) games.html (c) contact.html (d) about.html - 36.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
- 37.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <!DOCTYPE html> (d) <body>
-
38.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Riya’s Recipes (b) body (c) We won by 5 runs. (d) Match report -
39.🔍 One closing tag is missing. Which one?
<strong>I love mangoes.</strong>
<u>Hello, world!
<h3>My best friend</h3> (a) </h3> (b) </strong> (c) </h1> (d) </u> - 40.Which of these is true of a web server? (a) has an address bar (b) is where we type code (c) answers page requests (d) opens web pages for us
Answer key
- <img>
- <h5>
- stores a website’s files
- False
- a code editor
- True
- False
- 3
- <body>
- bus.jpg
- <li>
- <h1>
- element
- False
- <!DOCTYPE html>
- in the head
- contact.html
- 2
- a code editor
- 4
- to leave notes
- has an address bar
- <a href="about.html">
- <!DOCTYPE html>
- <ul>
- tags
- The red kite
- <h6>
- shows line numbers
- <h5>
- True
- Hello, world!
- False
- False
- games.html
- 6
- <!DOCTYPE html>
- Match report
- </u>
- answers page requests
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids