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 tag is used for the main title on a page? (a) <br> (b) <h1> (c) <h6> (d) <p>
- 2.🖼️ Which tag puts a picture on a page? (a) <img> (b) <a> (c) <pic> (d) <p>
- 3.📄 Can HTML on its own run a game loop? (a) No (b) Yes
-
4.🔗 Which address opens when you click this link?
<a href="art.html">Art corner</a> (a) art.html (b) Art corner (c) quiz.html (d) news.html -
5.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>I love mangoes.</p>
<p>Good morning!</p>
<p>Rain today</p>
<p>Fun facts</p>
<h2>Good morning!</h2> - 6.Which of these is an opening tag? (a) </title> (b) <p> (c) </p> (d) </body>
-
7.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>I love mangoes.</p>
<h2>I love mangoes.</h2> -
8.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>Good morning!</p>
<!-- <p>Our school trip</p> --> -
9.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p>
<p>Good morning!</p> (a) Fun facts (b) Rain today (c) Good morning! (d) Cricket is fun. - 10.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <img> (d) <a>
- 11.True or false: a web server opens web pages for us. (a) True (b) False
-
12.🔍 Which line is missing its closing tag?
line 1: <h3>Cricket is fun.</h3>
line 2: <strong>The red kite
line 3: <h2>My pets</h2> (a) line 2 (b) line 3 (c) line 1 - 13.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
-
14.📋 What number does the browser show next to “Banana”?
<ol start="3">
<li>Litchi</li>
<li>Banana</li>
<li>Orange</li>
</ol> - 15.True or false: <img> goes in the head. (a) False (b) True
- 16.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
17.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p>
<p>The red kite</p> -
18.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Orange</li>
</ul> - 19.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 20.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) </head> (c) <head> (d) <!DOCTYPE html>
-
21.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Our school trip</p>
<!-- <p>My best friend</p> -->
<p>Fun facts</p> (a) Our school trip (b) My pets (c) My best friend (d) Fun facts -
22.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<p>Hello, world!</p> (a) Rain today (b) Hello, world! (c) I love mangoes. - 23.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) width (d) height
-
24.🔗 Which address opens when you click this link?
<a href="maths.html">Maths fun</a> (a) art.html (b) maths.html (c) Maths fun (d) news.html -
25.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Papaya</li>
<li>Jamun</li>
</ul> -
26.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>Cricket is fun.</h2>
<h2>Our school trip</h2>
<p>The red kite</p> - 27.Which of these is an empty tag? (a) <h1> (b) <p> (c) <meta> (d) <title>
-
28.🔗 Which address opens when you click this link?
<a href="quiz.html">Art corner</a> (a) quiz.html (b) Art corner (c) about.html (d) games.html - 29.🔍 Which is the odd one out? (a) shows pages from the web (b) shows line numbers (c) has an address bar (d) opens web pages for us
- 30.📛 In <a href="x.html">, what is href? (a) a comment (b) a closing tag (c) an element name (d) an attribute
-
31.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Jamun</li>
<li>Papaya</li>
</ol> -
32.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Match report</h1>
<p>Mars is red.</p>
</body>
</html> (a) Art Gallery (b) Mars is red. (c) Match report (d) index.html - 33.True or false: <li> is an empty tag. (a) False (b) True
-
34.🔍 Which line is missing its closing tag?
line 1: <u>The red kite
line 2: <strong>Fun facts</strong>
line 3: <em>Rain today</em> (a) line 1 (b) line 3 (c) line 2 -
35.🔍 One closing tag is missing. Which one?
<em>Fun facts</em>
<u>Good morning!
<i>Rain today</i> (a) </u> (b) </i> (c) </h3> (d) </em> -
36.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="100"> (a) A red kite (b) map.png (c) kite.png (d) cake.jpg - 37.Which of these is true of a code editor? (a) turns HTML into a page (b) opens web pages for us (c) is where we type code (d) answers page requests
-
38.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Hello, world!</p>
<!-- <p>Our school trip</p> --> (a) Our school trip (b) Hello, world! (c) The red kite - 39.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
- 40.Which of these is an empty tag? (a) <img> (b) <p> (c) <ul> (d) <b>
Answer key
- <h1>
- <img>
- No
- art.html
- 5
- <p>
- 2
- 2
- Fun facts
- <a>
- False
- line 2
- <ol>
- 4
- False
- an opening tag
- 2
- 4
- has a closing tag
- <!DOCTYPE html>
- My best friend
- I love mangoes.
- alt
- maths.html
- 3
- 2
- <meta>
- quiz.html
- shows line numbers
- an attribute
- 3
- Art Gallery
- False
- line 1
- </u>
- kite.png
- is where we type code
- Our school trip
- <li>
- <img>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids