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.🔍 One closing tag is missing. Which one?
<h3>My pets
<h2>Hello, world!</h2>
<b>Rain today</b> (a) </h3> (b) </h2> (c) </b> (d) </h1> - 2.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) <h1> (c) </h1> (d) <\h1>
-
3.🔗 Which words do you click on?
<a href="games.html">School news</a> (a) School news (b) games.html (c) Take the quiz (d) href -
4.🔍 One closing tag is missing. Which one?
<b>Rain today</b>
<h2>I love mangoes.
<h3>My pets</h3> (a) </b> (b) </h3> (c) </small> (d) </h2> - 5.💬 How does an HTML comment end? (a) >> (b) // (c) */ (d) -->
- 6.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h4>? (a) <h2> (b) <h1> (c) <h6> (d) <h4>
- 7.True or false: HTML on its own can count button clicks. (a) False (b) True
-
8.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) kite.png (b) A tiger asleep (c) tiger.jpg (d) map.png - 9.True or false: HTML on its own can pick a random number. (a) True (b) False
-
10.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h3>The red kite</h3>
<p>Fun facts</p> - 11.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 12.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) editor (d) address
-
13.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>I love mangoes.</p>
<h4>My pets</h4>
<p>Cricket is fun.</p> - 14.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
15.🔗 Which address opens when you click this link?
<a href="games.html">Take the quiz</a> (a) Take the quiz (b) contact.html (c) games.html (d) about.html - 16.🧱 HTML gives a web page its ___. (a) sound (b) speed (c) colours (d) structure
- 17.Which of these is true of a code editor? (a) stores a website’s files (b) colours code to help us (c) shows pages from the web (d) sends pages over the net
- 18.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
-
19.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Our school trip</p>
<!-- <p>My best friend</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>My pets</p> --> - 20.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to describe the image (d) to load it faster
- 21.Which of these is true of a web server? (a) saves our .html files (b) is where we type code (c) hosts websites online (d) has an address bar
- 22.True or false: a web browser answers page requests. (a) False (b) True
-
23.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Banana</li>
<li>Orange</li>
<li>Litchi</li>
<li>Grapes</li>
</ol> -
24.🔍 Which line is missing its closing tag?
line 1: <small>Our school trip</small>
line 2: <u>I love mangoes.
line 3: <p>My best friend</p> (a) line 1 (b) line 3 (c) line 2 - 25.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
- 26.True or false: a web browser shows pages from the web. (a) False (b) True
- 27.True or false: <style> goes in the head. (a) True (b) False
-
28.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Stars shine</p> -
29.📋 What number does the browser show next to “Litchi”?
<ol start="2">
<li>Jamun</li>
<li>Papaya</li>
<li>Litchi</li>
</ol> - 30.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
-
31.🔍 One closing tag is missing. Which one?
<em>Good morning!</em>
<i>My best friend
<u>Our school trip</u> (a) </u> (b) </em> (c) </i> (d) </p> - 32.Which of these is a closing tag? (a) </b> (b) <li> (c) <h1> (d) <title>
-
33.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>Here is my best one.</p>
</body>
</html> (a) body (b) My drawings (c) Here is my best one. (d) Class 7 Blog - 34.💬 Does the browser show comments on the page? (a) No (b) Yes
-
35.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Grapes</li>
</ol> -
36.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<p>Our school trip</p>
<p>Hello, world!</p> - 37.Which of these is true of a code editor? (a) shows pages from the web (b) shows line numbers (c) opens web pages for us (d) stores a website’s files
- 38.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
-
39.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="350"> -
40.🔗 Which words do you click on?
<a href="news.html">About us</a> (a) Contact us (b) news.html (c) About us (d) href
Answer key
- </h3>
- </h1>
- School news
- </h2>
- -->
- <h1>
- False
- tiger.jpg
- False
- 2
- a closing tag
- element
- 2
- Yes
- games.html
- structure
- colours code to help us
- a web server
- 2
- to describe the image
- hosts websites online
- False
- 5
- line 2
- in the body
- True
- True
- 2
- 4
- 6
- </i>
- </b>
- My drawings
- No
- 2
- 3
- shows line numbers
- a web browser
- 350
- About us
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids