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 one is where we type code? (a) a web browser (b) a web server (c) a code editor
- 3.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
- 4.Which of these is an empty tag? (a) <li> (b) <p> (c) <meta> (d) <h1>
- 5.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <link> (d) <img>
- 6.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
- 7.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
- 8.Which of these is true of a web browser? (a) has an address bar (b) stores a website’s files (c) is where we type code (d) answers page requests
- 9.Which of these is an empty tag? (a) <ul> (b) <input> (c) <p> (d) <h1>
-
10.🔍 Which line is missing its closing tag?
line 1: <small>Cricket is fun.
line 2: <h3>I love mangoes.</h3>
line 3: <u>Rain today</u> (a) line 1 (b) line 2 (c) line 3 -
11.🔗 Where does this link open?
<a href="art.html">Take the quiz</a> (a) in the same tab (b) in a new tab -
12.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Cricket is fun.</p>
<p>Cricket is fun.</p>
<p>My best friend</p> -
13.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>Hello, world!</h2>
<h2>Cricket is fun.</h2> - 14.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
15.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Hello, world!</p>
<!-- <p>Rain today</p> --> (a) I love mangoes. (b) Hello, world! (c) Rain today - 16.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
17.🔠 How many headings are in this code?
<h1>My pets</h1>
<h2>Fun facts</h2>
<p>My pets</p> - 18.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
19.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>The red kite</p>
<h2>Cricket is fun.</h2>
<p>Hello, world!</p>
<h4>The red kite</h4> - 20.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the title (d) the body
- 21.Which of these is a closing tag? (a) <li> (b) </title> (c) <p> (d) <title>
- 22.True or false: a web server answers page requests. (a) True (b) False
-
23.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Banana</li>
<li>Litchi</li>
</ol> (a) numbers (b) bullets -
24.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) dog.jpg (b) moon.png (c) A happy dog (d) bus.jpg - 25.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
-
26.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Papaya</li>
<li>Banana</li>
<li>Litchi</li>
<li>Grapes</li>
</ul> - 27.True or false: a code editor sends pages over the net. (a) False (b) True
- 28.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) address (c) attribute (d) element
- 29.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) href (d) id
- 30.Which of these has a closing tag? (a) <img> (b) <input> (c) <meta> (d) <p>
-
31.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="100"> (a) Birthday cake (b) moon.png (c) cake.jpg (d) dog.jpg - 32.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
- 33.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 10 (d) 3
-
34.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="50"> (a) A red kite (b) map.png (c) kite.png (d) cake.jpg -
35.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<!-- <p>I love mangoes.</p> --> - 36.True or false: <style> goes in the head. (a) False (b) True
- 37.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it blank (c) makes it bold (d) opens it in a new tab
-
38.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Good morning!</p> -->
<p>My best friend</p>
<!-- <p>Cricket is fun.</p> --> -
39.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow<br>Roses are red<br>Kites fly high</p> -
40.📋 What number does the browser show next to “Banana”?
<ol>
<li>Orange</li>
<li>Mango</li>
<li>Banana</li>
<li>Jamun</li>
</ol>
Answer key
- <!--
- a code editor
- <ol>
- <meta>
- <a>
- to leave notes
- Yes
- has an address bar
- <input>
- line 1
- in the same tab
- 1
- 1
- has a closing tag
- Rain today
- an opening tag
- 2
- Yes
- 3
- the body
- </title>
- True
- numbers
- dog.jpg
- <ul>
- 5
- False
- element
- href
- <p>
- cake.jpg
- <ul>
- 6
- kite.png
- 1
- True
- opens it in a new tab
- 1
- 4
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids