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 list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
-
2.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) Play games (b) href (c) About us (d) https://example.com - 3.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 4.True or false: <li> has a closing tag. (a) True (b) False
- 5.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
-
6.🔗 Where does this link open?
<a href="contact.html" target="_blank">Take the quiz</a> (a) in the same tab (b) in a new tab -
7.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Jamun</li>
<li>Banana</li>
</ol> (a) numbers (b) bullets - 8.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
9.🔍 Which line is missing its closing tag?
line 1: <small>My best friend</small>
line 2: <u>Cricket is fun.</u>
line 3: <i>The red kite (a) line 2 (b) line 3 (c) line 1 - 10.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the head (d) the body
-
11.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Jamun</li>
<li>Guava</li>
</ol> (a) bullets (b) numbers - 12.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h1>? (a) <h1> (b) <h4> (c) <h3> (d) <h2>
- 13.🌐 Which one colours code to help us? (a) a web browser (b) a web server (c) a code editor
-
14.🔗 Which address opens when you click this link?
<a href="https://example.com">Play games</a> (a) maths.html (b) https://example.com (c) art.html (d) Play games - 15.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dot . (c) a dollar $ (d) a hash #
-
16.🔍 One closing tag is missing. Which one?
<h1>Our school trip</h1>
<b>Cricket is fun.
<i>Hello, world!</i> (a) </b> (b) </h1> (c) </i> (d) </p> - 17.📝 What does <hr> draw? (a) a table (b) a line across the page (c) a picture (d) a link
- 18.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h1> or <h5>? (a) <h1> (b) <h4> (c) <h5> (d) <h2>
- 19.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <img> (d) <p>
- 20.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
21.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<p>My best friend</p> (a) Fun facts (b) Cricket is fun. (c) My best friend (d) Hello, world! - 22.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) src (d) href
-
23.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Mango</li>
</ul> -
24.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p>
<p>Our school trip</p> -
25.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Match report</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) body (c) Space Facts (d) Match report -
26.📋 What number does the browser show next to “Grapes”?
<ol start="2">
<li>Jamun</li>
<li>Grapes</li>
<li>Orange</li>
</ol> - 27.💬 How does an HTML comment start? (a) <!-- (b) # (c) // (d) /*
- 28.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
- 29.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
-
30.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red<br>Birds sing</p> - 31.True or false: HTML on its own can keep a high score. (a) True (b) False
- 32.Which of these is true of a web browser? (a) colours code to help us (b) hosts websites online (c) opens web pages for us (d) answers page requests
- 33.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
-
34.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Cricket is fun.</p>
<p>Good morning!</p>
<!-- <p>The red kite</p> --> (a) The red kite (b) Our school trip (c) Good morning! (d) Cricket is fun. - 35.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
-
36.🔗 Which words do you click on?
<a href="maths.html">Play games</a> (a) maths.html (b) About us (c) href (d) Play games -
37.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>My best friend</h2>
<p>My pets</p>
<h4>Our school trip</h4> - 38.🏷️ HTML marks up text using ___. (a) wires (b) pixels (c) tags (d) keys
- 39.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
- 40.True or false: in <img>, alt tells which image to load. (a) True (b) False
Answer key
- <ol>
- Play games
- No
- True
- Markup
- in a new tab
- numbers
- an opening tag
- line 3
- the body
- numbers
- <h1>
- a code editor
- https://example.com
- a slash /
- </b>
- a line across the page
- <h5>
- <a>
- Yes
- Fun facts
- href
- 5
- 2
- Match report
- 3
- <!--
- False
- in the body
- 3
- False
- opens web pages for us
- False
- The red kite
- in the head
- Play games
- 3
- tags
- a web browser
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids