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.💬 Does the browser show comments on the page? (a) Yes (b) No
- 2.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
- 3.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a src="about.html">
- 4.Which of these is an empty tag? (a) <br> (b) <li> (c) <p> (d) <h1>
-
5.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> -
6.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Hello, world!</p>
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p> (a) Cricket is fun. (b) Fun facts (c) Rain today (d) Hello, world! - 7.True or false: <ul> has a closing tag. (a) False (b) True
- 8.True or false: a code editor has an address bar. (a) False (b) True
- 9.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
-
10.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> - 11.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
- 12.True or false: <input> has a closing tag. (a) True (b) False
- 13.True or false: in <img>, width sets how tall it is. (a) True (b) False
-
14.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="200"> - 15.Which of these is an opening tag? (a) <body> (b) </b> (c) </body> (d) </h1>
- 16.🏷️ Which is the closing tag for <u>? (a) <\u> (b) <u/> (c) </u> (d) <u>
- 17.True or false: <ul> lists steps in order. (a) False (b) True
-
18.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Welcome! (b) Thanks for visiting. (c) index.html (d) Art Gallery -
19.🔍 Which line is missing its closing tag?
line 1: <i>Rain today
line 2: <strong>I love mangoes.</strong>
line 3: <small>Cricket is fun.</small> (a) line 3 (b) line 1 (c) line 2 -
20.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) Play games (b) href (c) About us (d) games.html -
21.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Litchi</li>
</ul> (a) bullets (b) numbers - 22.Which of these has a closing tag? (a) <hr> (b) <br> (c) <title> (d) <img>
-
23.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="350"> (a) width (b) A happy dog (c) dog.jpg (d) The full moon - 24.Which of these is true of a web server? (a) saves our .html files (b) stores a website’s files (c) opens web pages for us (d) has an address bar
- 25.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
- 26.True or false: in <img>, src shows if the image fails. (a) True (b) False
- 27.🔗 Which tag makes a clickable link? (a) <a> (b) <link> (c) <p> (d) <img>
-
28.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Good morning!</p>
<p>The red kite</p>
<!-- <p>Hello, world!</p> --> (a) Our school trip (b) Good morning! (c) Hello, world! (d) The red kite - 29.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
30.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Banana</li>
</ul> - 31.📝 What does <p> make? (a) a picture (b) a table (c) a paragraph (d) a link
-
32.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>Our school trip</p>
<!-- <p>Fun facts</p> --> -
33.🔗 Which words do you click on?
<a href="about.html">Visit the site</a> (a) href (b) about.html (c) Maths fun (d) Visit the site - 34.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
35.🔗 Which address opens when you click this link?
<a href="contact.html">Contact us</a> (a) https://example.com (b) Contact us (c) maths.html (d) contact.html - 36.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
- 37.💬 How does an HTML comment start? (a) // (b) <!-- (c) # (d) /*
-
38.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Rivers flow</p> -
39.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Jamun</li>
<li>Banana</li>
</ol> (a) numbers (b) bullets -
40.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="150"> (a) Birthday cake (b) width (c) cake.jpg (d) A happy dog
Answer key
- No
- <ol>
- <a href="about.html">
- <br>
- 200
- Rain today
- True
- False
- a line across the page
- 400
- opens it in a new tab
- False
- False
- 200
- <body>
- </u>
- False
- Art Gallery
- line 1
- Play games
- bullets
- <title>
- A happy dog
- stores a website’s files
- a slash /
- False
- <a>
- Hello, world!
- No
- 2
- a paragraph
- 2
- Visit the site
- an opening tag
- contact.html
- <ul>
- <!--
- 2
- numbers
- Birthday cake
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids