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.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Good morning!</p>
<h2>The red kite</h2>
<h2>I love mangoes.</h2>
<p>Good morning!</p> - 2.🖼️ Which attribute of <img> names the picture file? (a) height (b) src (c) alt (d) width
-
3.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h3>The red kite</h3>
<p>My best friend</p>
<p>Rain today</p>
<p>Fun facts</p> - 4.True or false: <ul> lists things in any order. (a) True (b) False
-
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> (a) A tiger asleep (b) A red kite (c) width (d) tiger.jpg -
6.🔗 Where does this link open?
<a href="maths.html">School news</a> (a) in a new tab (b) in the same tab - 7.Which of these is an opening tag? (a) </p> (b) <b> (c) </title> (d) </li>
- 8.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
- 9.💬 Does the browser show comments on the page? (a) No (b) Yes
-
10.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing<br>Sky is blue<br>Stars shine</p> - 11.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 12.📝 What does <p> make? (a) a link (b) a table (c) a paragraph (d) a picture
- 13.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) alt (c) src (d) width
- 14.Which of these has a closing tag? (a) <input> (b) <b> (c) <hr> (d) <br>
- 15.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
16.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>My pets</p>
<p>Fun facts</p> (a) My pets (b) Good morning! (c) Fun facts -
17.🔍 One closing tag is missing. Which one?
<small>Good morning!</small>
<h3>Fun facts</h3>
<strong>My pets (a) </h3> (b) </strong> (c) </p> (d) </small> -
18.🔗 Where does this link open?
<a href="about.html" target="_blank">School news</a> (a) in a new tab (b) in the same tab - 19.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h5> or <h2>? (a) <h5> (b) <h2> (c) <h4> (d) <h1>
-
20.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Match report (b) My Hobbies (c) Here is my best one. (d) index.html -
21.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>Fun facts</p>
<!-- <p>My best friend</p> -->
<p>Hello, world!</p> - 22.Which of these has a closing tag? (a) <input> (b) <br> (c) <meta> (d) <li>
- 23.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ol> (d) <ul>
- 24.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
- 25.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) attribute (d) editor
- 26.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h5> (d) <h3>
-
27.🔗 Which words do you click on?
<a href="games.html">School news</a> (a) Take the quiz (b) href (c) games.html (d) School news -
28.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Grapes</li>
<li>Papaya</li>
<li>Banana</li>
<li>Litchi</li>
<li>Mango</li>
</ol> - 29.Which of these is an opening tag? (a) </p> (b) </title> (c) <h1> (d) </h1>
- 30.True or false: a web server hosts websites online. (a) True (b) False
- 31.Which of these goes in the head? (a) <ul> (b) <a> (c) <title> (d) <table>
-
32.🔍 Which line is missing its closing tag?
line 1: <h2>Hello, world!</h2>
line 2: <p>Cricket is fun.
line 3: <h1>My pets</h1> (a) line 3 (b) line 2 (c) line 1 -
33.🔗 Which words do you click on?
<a href="about.html">Art corner</a> (a) href (b) School news (c) about.html (d) Art corner - 34.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 35.True or false: <ol> goes inside ul or ol. (a) False (b) True
-
36.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) map.png (b) kite.png (c) A tiger asleep (d) tiger.jpg - 37.True or false: HTML on its own can run a game loop. (a) True (b) False
-
38.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<p>My best friend</p>
<p>My pets</p> - 39.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
40.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Mango</li>
<li>Guava</li>
</ol> (a) bullets (b) numbers
Answer key
- 3
- src
- 2
- True
- A tiger asleep
- in the same tab
- <b>
- False
- No
- 4
- an empty tag
- a paragraph
- alt
- <b>
- a closing tag
- Good morning!
- </strong>
- in a new tab
- <h1>
- My Hobbies
- 2
- <li>
- <ul>
- <a>
- element
- <h1>
- School news
- 6
- <h1>
- True
- <title>
- line 2
- Art corner
- No
- False
- tiger.jpg
- False
- 2
- an opening tag
- numbers
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids