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.💬 How does an HTML comment start? (a) # (b) // (c) <!-- (d) /*
-
2.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) About us (b) contact.html (c) Play games (d) href - 3.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
-
4.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) Class 7 Blog (c) Easy snacks (d) index.html -
5.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Cricket is fun.</p>
<h2>Good morning!</h2>
<p>Fun facts</p>
<p>I love mangoes.</p> -
6.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Match report</h1>
<p>Mars is red.</p>
</body>
</html> (a) Class 7 Blog (b) index.html (c) Match report (d) Mars is red. -
7.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Orange</li>
<li>Litchi</li>
<li>Papaya</li>
<li>Jamun</li>
</ol> -
8.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>I love mangoes.</p> -->
<p>My best friend</p> - 9.True or false: in <img>, src sets how wide it is. (a) True (b) False
-
10.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets - 11.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 12.True or false: a web server hosts websites online. (a) False (b) True
- 13.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 14.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) src (c) width (d) alt
- 15.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
- 16.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) height (d) alt
-
17.🔗 Where does this link open?
<a href="contact.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab -
18.🔗 Which address opens when you click this link?
<a href="quiz.html">School news</a> (a) games.html (b) quiz.html (c) School news (d) about.html - 19.True or false: in <img>, src tells which image to load. (a) True (b) False
- 20.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
-
21.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) index.html (b) Here is my best one. (c) My Hobbies (d) Welcome! - 22.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) src (d) href
- 23.💬 Does the browser show comments on the page? (a) Yes (b) No
-
24.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> (a) tiger.jpg (b) map.png (c) A tiger asleep (d) kite.png - 25.True or false: HTML on its own can make a form. (a) True (b) False
- 26.Which of these is true of a code editor? (a) shows line numbers (b) turns HTML into a page (c) opens web pages for us (d) answers page requests
- 27.📄 Where does <table> go: in the head or in the body? (a) in the body (b) in the head
- 28.Which of these is a closing tag? (a) <body> (b) <b> (c) </b> (d) <li>
- 29.🔍 Which is the odd one out? (a) hosts websites online (b) shows line numbers (c) answers page requests (d) sends pages over the net
- 30.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
-
31.📋 What number does the browser show next to “Litchi”?
<ol start="5">
<li>Grapes</li>
<li>Mango</li>
<li>Litchi</li>
</ol> - 32.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <img> (d) <a>
- 33.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h2>? (a) <h2> (b) <h5> (c) <h4> (d) <h3>
-
34.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<!-- <p>My pets</p> -->
<p>Fun facts</p> (a) Hello, world! (b) My pets (c) Fun facts (d) Cricket is fun. - 35.🔤 In “HTML”, what does the L stand for? (a) Language (b) Link (c) Laptop (d) Line
- 36.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
- 37.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h4>? (a) <h4> (b) <h6> (c) <h2> (d) <h1>
- 38.🔢 In a basic web page file, which comes FIRST? (a) </body> (b) <!DOCTYPE html> (c) <html> (d) <head>
-
39.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>My pets</p>
<!-- <p>Fun facts</p> --> (a) My pets (b) Hello, world! (c) Fun facts -
40.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p>
<p>My pets</p>
<p>Hello, world!</p> (a) My pets (b) I love mangoes. (c) Hello, world! (d) The red kite
Answer key
- <!--
- Play games
- <ol>
- Class 7 Blog
- 2
- Class 7 Blog
- 3
- 1
- False
- bullets
- No
- True
- an opening tag
- width
- Yes
- src
- in a new tab
- quiz.html
- True
- opens it in a new tab
- My Hobbies
- href
- No
- tiger.jpg
- True
- shows line numbers
- in the body
- </b>
- shows line numbers
- <ol>
- 7
- <a>
- <h2>
- My pets
- Language
- <h6>
- <h1>
- <!DOCTYPE html>
- Fun facts
- I love mangoes.
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids