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) <br> (b) <ol> (c) <hr> (d) <ul>
- 2.True or false: in <img>, alt names the picture file. (a) False (b) True
-
3.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) href (b) Play games (c) Take the quiz (d) maths.html -
4.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Cricket is fun.</p>
<!-- <p>My pets</p> --> (a) Good morning! (b) My pets (c) Cricket is fun. - 5.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
-
6.🔗 Which words do you click on?
<a href="news.html">About us</a> (a) news.html (b) Contact us (c) href (d) About us - 7.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
8.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="150"> (a) tiger.jpg (b) fort.jpg (c) An old fort (d) kite.png - 9.💬 How does an HTML comment end? (a) // (b) */ (c) --> (d) >>
-
10.🔗 Where does this link open?
<a href="about.html">About us</a> (a) in the same tab (b) in a new tab - 11.📄 Can HTML on its own pick a random number? (a) Yes (b) No
- 12.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h6> or <h3>? (a) <h5> (b) <h3> (c) <h6> (d) <h1>
- 13.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 14.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <body> (d) <head>
- 15.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 16.💬 Does the browser show comments on the page? (a) Yes (b) No
- 17.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
-
18.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>I love mangoes.</p>
<h3>Cricket is fun.</h3>
<h4>Rain today</h4> - 19.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) width (c) height (d) src
- 20.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
-
21.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Grapes</li>
<li>Mango</li>
</ol> (a) numbers (b) bullets -
22.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Mango</li>
<li>Grapes</li>
<li>Guava</li>
</ul> - 23.True or false: <ul> lists things in any order. (a) True (b) False
- 24.📝 What does <br> do? (a) makes a list (b) makes text bold (c) starts a new line (d) adds a picture
- 25.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h4> or <h1>? (a) <h1> (b) <h2> (c) <h4> (d) <h3>
- 26.Which of these goes in the body? (a) <ul> (b) <title> (c) <style> (d) <link rel="stylesheet">
-
27.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>My pets</p>
<!-- <p>My best friend</p> -->
<p>Rain today</p> (a) Rain today (b) I love mangoes. (c) My pets (d) My best friend - 28.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
- 29.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
- 30.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) <html> (c) <!DOCTYPE html> (d) <head>
- 31.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to colour it (d) to make it bigger
- 32.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab
- 33.📝 What do we need to write HTML? (a) a microphone (b) a plain text editor (c) a paintbrush (d) a printer
-
34.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>The red kite</p> -->
<!-- <p>I love mangoes.</p> --> - 35.Which of these is an opening tag? (a) </title> (b) </p> (c) <body> (d) </h1>
- 36.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) height (c) alt (d) width
-
37.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>My best friend</p>
<p>I love mangoes.</p>
<p>My pets</p> - 38.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h2> or <h5>? (a) <h2> (b) <h3> (c) <h1> (d) <h5>
-
39.🔗 Which address opens when you click this link?
<a href="https://example.com">School news</a> (a) School news (b) maths.html (c) https://example.com (d) art.html -
40.🔍 Which line is missing its closing tag?
line 1: <i>I love mangoes.
line 2: <b>My pets</b>
line 3: <h2>The red kite</h2> (a) line 1 (b) line 3 (c) line 2
Answer key
- <ol>
- False
- Take the quiz
- My pets
- <!--
- About us
- a closing tag
- fort.jpg
- -->
- in the same tab
- No
- <h1>
- an opening tag
- <!DOCTYPE html>
- in the body
- No
- in the head
- 3
- src
- Yes
- numbers
- 6
- True
- starts a new line
- <h4>
- <ul>
- My best friend
- <li>
- a code editor
- <!DOCTYPE html>
- to describe the image
- on the browser tab
- a plain text editor
- 1
- <body>
- width
- 3
- <h5>
- https://example.com
- line 1
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids