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.True or false: <ul> goes inside ul or ol. (a) True (b) False
- 2.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h3> or <h4>? (a) <h3> (b) <h4> (c) <h5> (d) <h1>
-
3.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="400"> (a) width (b) Map of India (c) map.png (d) Birthday cake - 4.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
5.📋 What number does the browser show next to “Mango”?
<ol>
<li>Grapes</li>
<li>Mango</li>
<li>Banana</li>
<li>Guava</li>
<li>Jamun</li>
</ol> - 6.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <pic> (d) <img>
-
7.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>The red kite</h2>
<h2>The red kite</h2>
<p>I love mangoes.</p>
<p>My pets</p> -
8.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> -->
<!-- <p>The red kite</p> --> -
9.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="200"> (a) The full moon (b) dog.jpg (c) A happy dog (d) width - 10.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h6> or <h5>? (a) <h2> (b) <h5> (c) <h6> (d) <h3>
-
11.🔗 Where does this link open?
<a href="games.html">Contact us</a> (a) in a new tab (b) in the same tab - 12.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
13.🔍 Which line is missing its closing tag?
line 1: <h3>Good morning!</h3>
line 2: <u>My pets
line 3: <b>I love mangoes.</b> (a) line 2 (b) line 1 (c) line 3 - 14.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Laptop (d) Language
- 15.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 16.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a slash / (d) a hash #
- 17.Which of these goes in the body? (a) <img> (b) <meta charset="utf-8"> (c) <link rel="stylesheet"> (d) <title>
-
18.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Orange</li>
<li>Mango</li>
<li>Litchi</li>
<li>Grapes</li>
</ol> - 19.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
-
20.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>My pets</p>
<p>Cricket is fun.</p>
<p>Rain today</p> (a) Cricket is fun. (b) Rain today (c) My pets (d) The red kite -
21.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Rain today</p>
<!-- <p>Our school trip</p> --> - 22.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <head> (d) <body>
-
23.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Fun facts</h2>
<h2>Good morning!</h2>
<h2>Good morning!</h2>
<p>My pets</p>
<p>The red kite</p> - 24.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
- 25.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 26.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
27.🔗 Which words do you click on?
<a href="art.html">Play games</a> (a) Play games (b) href (c) About us (d) art.html - 28.Which of these is a closing tag? (a) <body> (b) <p> (c) </li> (d) <title>
-
29.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>Our school trip</p> -->
<p>My pets</p> (a) Good morning! (b) Our school trip (c) My pets - 30.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) hosts websites online (d) shows line numbers
-
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="300"> (a) An old fort (b) width (c) bus.jpg (d) Our school bus - 32.Which of these is an empty tag? (a) <p> (b) <li> (c) <title> (d) <img>
-
33.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> -->
<p>I love mangoes.</p> (a) I love mangoes. (b) Our school trip (c) Cricket is fun. - 34.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
35.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p>
<!-- <p>My pets</p> --> -
36.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) maths.html (b) Play games (c) Take the quiz (d) href -
37.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>My pets</p> -->
<p>Rain today</p>
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p> - 38.🖼️ Which attribute of <img> sets how tall it is? (a) width (b) alt (c) src (d) height
- 39.🔍 Which is the odd one out? (a) stores a website’s files (b) hosts websites online (c) answers page requests (d) saves our .html files
- 40.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
Answer key
- False
- <h1>
- Map of India
- a closing tag
- 2
- <img>
- 3
- 1
- A happy dog
- <h2>
- in the same tab
- an empty tag
- line 2
- Language
- No
- a slash /
- <img>
- 5
- a code editor
- The red kite
- 1
- <!DOCTYPE html>
- 3
- a code editor
- Yes
- a closing tag
- Play games
- </li>
- Our school trip
- shows line numbers
- Our school bus
- <img>
- Our school trip
- has a closing tag
- 2
- Take the quiz
- 2
- height
- saves our .html files
- has a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids