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 text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>My best friend</p> -->
<p>Good morning!</p>
<p>Fun facts</p> (a) Hello, world! (b) Fun facts (c) My best friend (d) Good morning! - 2.True or false: <br> has a closing tag. (a) True (b) False
-
3.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="150"> (a) fort.jpg (b) tiger.jpg (c) bus.jpg (d) Our school bus -
4.🔗 Which words do you click on?
<a href="art.html">School news</a> (a) href (b) School news (c) Take the quiz (d) art.html - 5.True or false: a code editor colours code to help us. (a) True (b) False
- 6.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <\h1> (c) <h1/> (d) </h1>
- 7.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
- 8.🌐 Which one stores a website’s files? (a) a code editor (b) a web browser (c) a web server
-
9.🔍 One closing tag is missing. Which one?
<small>Cricket is fun.</small>
<h1>Fun facts
<p>Our school trip</p> (a) </i> (b) </p> (c) </h1> (d) </small> -
10.🔍 Which line is missing its closing tag?
line 1: <h3>Hello, world!
line 2: <h2>The red kite</h2>
line 3: <p>I love mangoes.</p> (a) line 3 (b) line 1 (c) line 2 - 11.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 12.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h1> or <h2>? (a) <h5> (b) <h2> (c) <h1> (d) <h3>
- 13.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h5> or <h2>? (a) <h2> (b) <h3> (c) <h5> (d) <h4>
- 14.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
- 15.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to colour it (d) to load it faster
- 16.🔍 Which is the odd one out? (a) colours code to help us (b) saves our .html files (c) is where we type code (d) opens web pages for us
-
17.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="200"> -
18.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) My Hobbies (c) Planets (d) I like to read. - 19.True or false: HTML on its own cannot make headings. (a) True (b) False
- 20.True or false: HTML on its own cannot make links to pages. (a) False (b) True
-
21.📋 What number does the browser show next to “Banana”?
<ol start="6">
<li>Guava</li>
<li>Jamun</li>
<li>Banana</li>
<li>Orange</li>
</ol> - 22.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
- 23.Which of these has a closing tag? (a) <b> (b) <img> (c) <br> (d) <hr>
- 24.True or false: <ol> lists things in any order. (a) True (b) False
-
25.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p>
<p>Rain today</p> - 26.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
- 27.Which of these is an empty tag? (a) <p> (b) <h1> (c) <b> (d) <img>
-
28.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Guava</li>
<li>Grapes</li>
</ol> - 29.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) address (d) element
-
30.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Hello, world!</p>
<p>My pets</p>
<p>I love mangoes.</p> (a) I love mangoes. (b) My best friend (c) Hello, world! (d) My pets - 31.🔠 Which tag is the least important heading? (a) <p> (b) <h1> (c) <h3> (d) <h6>
-
32.🔗 Which address opens when you click this link?
<a href="games.html">Play games</a> (a) about.html (b) Play games (c) games.html (d) contact.html - 33.🔗 Which attribute holds the address of a link? (a) src (b) href (c) alt (d) id
- 34.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em> (c) <em/> (d) </em>
- 35.True or false: <ul> goes in the body. (a) True (b) False
-
36.🔗 Where does this link open?
<a href="maths.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 37.Which of these is true of a code editor? (a) opens web pages for us (b) answers page requests (c) shows pages from the web (d) colours code to help us
- 38.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
- 39.🔤 In “HTML”, what does the L stand for? (a) Line (b) Laptop (c) Language (d) Link
- 40.True or false: <ol> is an ordered list. (a) False (b) True
Answer key
- My best friend
- False
- bus.jpg
- School news
- True
- </h1>
- True
- a web server
- </h1>
- line 1
- an opening tag
- <h1>
- <h2>
- a web server
- to describe the image
- opens web pages for us
- 200
- My Hobbies
- False
- False
- 8
- <ol>
- <b>
- False
- 3
- 6
- <img>
- 5
- element
- My best friend
- <h6>
- games.html
- href
- </em>
- True
- in a new tab
- colours code to help us
- <ul>
- Language
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids