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 is the odd one out? (a) shows line numbers (b) answers page requests (c) sends pages over the net (d) stores a website’s files
-
2.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>The red kite</p>
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p> (a) Rain today (b) I love mangoes. (c) The red kite (d) My pets - 3.Which of these is true of a web server? (a) is where we type code (b) shows line numbers (c) stores a website’s files (d) shows pages from the web
-
4.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Rivers flow<br>Roses are red<br>Sky is blue<br>Kites fly high</p> - 5.Which of these goes in the body? (a) <p> (b) <meta charset="utf-8"> (c) <title> (d) <link rel="stylesheet">
- 6.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
- 7.🧱 HTML gives a web page its ___. (a) sound (b) speed (c) colours (d) structure
-
8.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Orange</li>
<li>Banana</li>
<li>Papaya</li>
<li>Guava</li>
<li>Grapes</li>
</ol> -
9.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) dog.jpg (b) A happy dog (c) bus.jpg (d) moon.png - 10.Which of these is an opening tag? (a) </h1> (b) <h1> (c) </b> (d) </p>
- 11.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 12.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
- 13.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h1> or <h6>? (a) <h5> (b) <h6> (c) <h3> (d) <h1>
- 14.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h2> or <h3>? (a) <h3> (b) <h5> (c) <h2> (d) <h4>
- 15.🏷️ Which is the closing tag for <p>? (a) <p> (b) <\p> (c) <p/> (d) </p>
-
16.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) index.html (b) Space Facts (c) All about me (d) Thanks for visiting. - 17.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) height (c) src (d) width
-
18.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h2>The red kite</h2>
<h2>My best friend</h2> - 19.💬 How does an HTML comment end? (a) >> (b) // (c) --> (d) */
-
20.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Hello, world!</h2>
<p>Fun facts</p>
<p>My best friend</p> - 21.Which of these is true of a code editor? (a) answers page requests (b) shows pages from the web (c) sends pages over the net (d) colours code to help us
- 22.True or false: a code editor colours code to help us. (a) False (b) True
-
23.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Banana</li>
</ol> -
24.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h3>My pets</h3>
<h2>Good morning!</h2>
<h3>My best friend</h3> -
25.🔍 Which line is missing its closing tag?
line 1: <h3>I love mangoes.</h3>
line 2: <h2>Good morning!
line 3: <em>Rain today</em> (a) line 1 (b) line 2 (c) line 3 -
26.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Good morning!</p>
<p>Our school trip</p>
<h2>The red kite</h2> - 27.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Link (c) Line (d) Language
-
28.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>Rain today</h2>
<h2>Fun facts</h2> - 29.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
-
30.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Our school trip</p>
<p>Rain today</p>
<!-- <p>My pets</p> --> (a) My best friend (b) Our school trip (c) Rain today (d) My pets -
31.🔗 Where does this link open?
<a href="quiz.html">Contact us</a> (a) in a new tab (b) in the same tab - 32.Which of these is a closing tag? (a) <body> (b) </b> (c) <h1> (d) <title>
-
33.🔗 Which address opens when you click this link?
<a href="about.html">Take the quiz</a> (a) contact.html (b) Take the quiz (c) about.html (d) https://example.com -
34.🔗 Which words do you click on?
<a href="https://example.com">Art corner</a> (a) School news (b) href (c) https://example.com (d) Art corner -
35.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Guava</li>
<li>Papaya</li>
<li>Grapes</li>
</ol> - 36.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 4 (d) 6
-
37.🔗 Which words do you click on?
<a href="maths.html">Maths fun</a> (a) Art corner (b) href (c) maths.html (d) Maths fun - 38.True or false: <li> goes inside ul or ol. (a) False (b) True
- 39.Which of these is a closing tag? (a) </title> (b) <p> (c) <title> (d) <b>
-
40.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p>
<p>My pets</p> (a) Cricket is fun. (b) My pets (c) Good morning! (d) My best friend
Answer key
- shows line numbers
- Rain today
- stores a website’s files
- 5
- <p>
- False
- structure
- 5
- dog.jpg
- <h1>
- Yes
- <ul>
- <h6>
- <h5>
- </p>
- Space Facts
- alt
- 3
- -->
- 3
- colours code to help us
- True
- 2
- 4
- line 2
- 2
- Language
- 3
- src
- My pets
- in the same tab
- </b>
- about.html
- Art corner
- 2
- 6
- Maths fun
- True
- </title>
- Cricket is fun.
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids