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 items does this list show?
<ul>
<li>Guava</li>
<li>Mango</li>
</ul> - 2.True or false: in <img>, alt shows if the image fails. (a) False (b) True
- 3.True or false: in <img>, width sets how wide it is. (a) True (b) False
- 4.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
-
5.🔗 Which address opens when you click this link?
<a href="games.html">About us</a> (a) contact.html (b) about.html (c) games.html (d) About us - 6.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h5> or <h4>? (a) <h4> (b) <h5> (c) <h6> (d) <h3>
- 7.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h6> or <h2>? (a) <h1> (b) <h4> (c) <h2> (d) <h6>
-
8.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) width (b) The full moon (c) dog.jpg (d) A happy dog -
9.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Fun facts</p> -->
<p>Good morning!</p> - 10.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
11.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> -->
<p>The red kite</p>
<p>Rain today</p> (a) Cricket is fun. (b) Rain today (c) The red kite (d) Our school trip -
12.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Hello, world!</p> -->
<p>The red kite</p>
<p>Cricket is fun.</p>
<!-- <p>My best friend</p> --> -
13.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>My best friend</p> --> - 14.True or false: a code editor opens web pages for us. (a) True (b) False
- 15.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h4> or <h1>? (a) <h5> (b) <h4> (c) <h3> (d) <h1>
- 16.True or false: in <img>, src tells which image to load. (a) False (b) True
- 17.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 18.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
- 19.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
20.🔍 One closing tag is missing. Which one?
<small>My pets</small>
<p>Good morning!
<h3>Our school trip</h3> (a) </small> (b) </p> (c) </em> (d) </h3> - 21.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
- 22.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) alt (d) src
-
23.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>The red kite</p>
<!-- <p>Hello, world!</p> --> (a) The red kite (b) Hello, world! (c) Cricket is fun. -
24.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>My pets</p>
<!-- <p>Cricket is fun.</p> --> (a) My pets (b) Cricket is fun. (c) Hello, world! - 25.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
- 26.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
- 27.🔢 In a basic web page file, which comes LAST? (a) </body> (b) <!DOCTYPE html> (c) <head> (d) </html>
- 28.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h1> or <h6>? (a) <h4> (b) <h6> (c) <h1> (d) <h5>
-
29.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p>
<p>My pets</p> - 30.🔤 In “HTML”, what does the L stand for? (a) Language (b) Laptop (c) Line (d) Link
-
31.🔍 One closing tag is missing. Which one?
<small>Hello, world!</small>
<h1>Our school trip
<p>Good morning!</p> (a) </h1> (b) </p> (c) </small> (d) </strong> - 32.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) address (d) editor
- 33.🔠 How many heading levels does HTML have? (a) 10 (b) 6 (c) 4 (d) 3
-
34.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="300"> (a) A tiger asleep (b) fort.jpg (c) width (d) An old fort - 35.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to colour it (c) to describe the image (d) to load it faster
-
36.🔍 One closing tag is missing. Which one?
<h2>I love mangoes.</h2>
<strong>Rain today
<em>The red kite</em> (a) </b> (b) </strong> (c) </h2> (d) </em> - 37.True or false: <img> goes in the body. (a) True (b) False
- 38.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
- 39.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
-
40.📋 How many items does this list show?
<ol>
<li>Mango</li>
<li>Jamun</li>
</ol>
Answer key
- 2
- True
- True
- <a>
- games.html
- <h3>
- <h6>
- A happy dog
- 1
- has a closing tag
- Our school trip
- 2
- 2
- False
- <h5>
- True
- an opening tag
- stores a website’s files
- an empty tag
- </p>
- a paragraph
- width
- Hello, world!
- Cricket is fun.
- <img>
- in the body
- </html>
- <h6>
- 2
- Language
- </h1>
- element
- 6
- An old fort
- to describe the image
- </strong>
- True
- <ul>
- No
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids