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.📝 What does <hr> draw? (a) a line across the page (b) a picture (c) a link (d) a table
- 2.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h2>? (a) <h1> (b) <h2> (c) <h5> (d) <h3>
- 3.Which of these goes in the head? (a) <table> (b) <p> (c) <title> (d) <h1>
- 4.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
-
5.🔗 Which words do you click on?
<a href="art.html">Art corner</a> (a) School news (b) href (c) Art corner (d) art.html -
6.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Good morning!</p>
<!-- <p>My pets</p> -->
<!-- <p>Rain today</p> --> -
7.🔗 Which address opens when you click this link?
<a href="about.html">Play games</a> (a) Play games (b) about.html (c) contact.html (d) https://example.com - 8.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
- 9.🌐 Which one hosts websites online? (a) a code editor (b) a web browser (c) a web server
- 10.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h6> or <h4>? (a) <h6> (b) <h4> (c) <h1> (d) <h5>
-
11.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Jamun</li>
<li>Orange</li>
</ul> (a) numbers (b) bullets - 12.🔍 Which is the odd one out? (a) stores a website’s files (b) is where we type code (c) answers page requests (d) sends pages over the net
- 13.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 14.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <title> (d) <h1>
- 15.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
-
16.🔗 Which words do you click on?
<a href="https://example.com">Maths fun</a> (a) Art corner (b) https://example.com (c) Maths fun (d) href -
17.🔍 One closing tag is missing. Which one?
<p>Good morning!</p>
<h3>My best friend</h3>
<h1>My pets (a) </p> (b) </em> (c) </h3> (d) </h1> - 18.🔗 What does HyperText mean? (a) secret text (b) text with links (c) text in colour (d) very big text
- 19.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h6> or <h2>? (a) <h1> (b) <h2> (c) <h4> (d) <h6>
- 20.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h3> or <h5>? (a) <h2> (b) <h6> (c) <h3> (d) <h5>
-
21.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>I love mangoes.</p>
<h4>My pets</h4>
<h2>My best friend</h2> -
22.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="150"> - 23.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <body> (c) <html> (d) </html>
-
24.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> --> (a) I love mangoes. (b) Cricket is fun. (c) Hello, world! - 25.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
- 26.🏷️ Which is the closing tag for <u>? (a) <u> (b) <\u> (c) </u> (d) <u/>
- 27.Which of these is true of a code editor? (a) shows line numbers (b) sends pages over the net (c) opens web pages for us (d) has an address bar
-
28.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Here is my best one. (b) Welcome! (c) Class 7 Blog (d) body - 29.🏷️ HTML marks up text using ___. (a) wires (b) pixels (c) keys (d) tags
-
30.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="250"> (a) tiger.jpg (b) An old fort (c) kite.png (d) fort.jpg - 31.Which of these goes in the head? (a) <table> (b) <a> (c) <style> (d) <h1>
- 32.True or false: a web server has an address bar. (a) False (b) True
- 33.🌐 Which one turns HTML into a page? (a) a web browser (b) a code editor (c) a web server
- 34.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) height (d) src
- 35.True or false: HTML on its own can make tables. (a) False (b) True
- 36.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
- 37.True or false: <title> goes in the body. (a) True (b) False
- 38.🔍 Which is the odd one out? (a) shows line numbers (b) has an address bar (c) saves our .html files (d) is where we type code
-
39.🔗 Where does this link open?
<a href="quiz.html">Visit the site</a> (a) in a new tab (b) in the same tab -
40.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Fun facts</p>
<p>Our school trip</p> (a) My pets (b) Fun facts (c) Our school trip
Answer key
- a line across the page
- <h5>
- <title>
- to describe the image
- Art corner
- 2
- about.html
- No
- a web server
- <h1>
- bullets
- is where we type code
- has a closing tag
- <h1>
- True
- Maths fun
- </h1>
- text with links
- <h6>
- <h2>
- 3
- 150
- <!DOCTYPE html>
- Hello, world!
- a web browser
- </u>
- shows line numbers
- Welcome!
- tags
- fort.jpg
- <style>
- False
- a web browser
- src
- True
- <!DOCTYPE html>
- False
- has an address bar
- in the same tab
- My pets
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids