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>Rain today</p>
<p>My best friend</p>
<!-- <p>Cricket is fun.</p> --> (a) Cricket is fun. (b) My best friend (c) Rain today - 2.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to describe the image (d) to colour it
-
3.🔗 Which words do you click on?
<a href="games.html">Maths fun</a> (a) Art corner (b) games.html (c) href (d) Maths fun -
4.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h3>Cricket is fun.</h3>
<p>The red kite</p>
<p>My best friend</p>
<p>I love mangoes.</p> -
5.🔍 One closing tag is missing. Which one?
<u>Rain today</u>
<b>Fun facts
<small>Good morning!</small> (a) </u> (b) </b> (c) </small> (d) </p> - 6.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
- 7.Which of these is an empty tag? (a) <img> (b) <p> (c) <b> (d) <h1>
- 8.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h3>? (a) <h4> (b) <h3> (c) <h2> (d) <h1>
-
9.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Hello, world!</p>
<p>Good morning!</p>
<!-- <p>Our school trip</p> --> -
10.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Fun facts</p>
<h2>The red kite</h2>
<p>I love mangoes.</p>
<p>The red kite</p>
<p>Our school trip</p> - 11.📋 Which list tag is one item of a list? (a) <li> (b) <ul> (c) <ol>
- 12.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
- 13.True or false: in <img>, alt sets how wide it is. (a) False (b) True
- 14.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 15.True or false: in <img>, alt is read by screen readers. (a) False (b) True
- 16.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h4>? (a) <h6> (b) <h5> (c) <h4> (d) <h3>
- 17.Which of these is an empty tag? (a) <h1> (b) <hr> (c) <p> (d) <b>
-
18.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Jamun</li>
</ul> -
19.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) Class 7 Blog (c) Match report (d) body - 20.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
- 21.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <pic> (d) <img>
- 22.📄 Can HTML on its own make headings? (a) No (b) Yes
- 23.True or false: a code editor shows line numbers. (a) True (b) False
-
24.🔗 Which address opens when you click this link?
<a href="https://example.com">Visit the site</a> (a) Visit the site (b) https://example.com (c) art.html (d) maths.html - 25.🔍 Which is the odd one out? (a) is where we type code (b) shows pages from the web (c) turns HTML into a page (d) has an address bar
- 26.📋 Which list tag is an ordered list? (a) <li> (b) <ul> (c) <ol>
-
27.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Rain today</p>
<h2>The red kite</h2>
<p>Fun facts</p> -
28.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="350"> (a) Map of India (b) A red kite (c) kite.png (d) width - 29.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h1> or <h6>? (a) <h1> (b) <h5> (c) <h6> (d) <h3>
- 30.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h4> or <h2>? (a) <h2> (b) <h4> (c) <h3> (d) <h1>
- 31.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
-
32.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Hello, world!</h2>
<p>Rain today</p> - 33.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </html> (c) <body> (d) <head>
-
34.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p> -
35.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<p>Good morning!</p> (a) Good morning! (b) Our school trip (c) I love mangoes. (d) Rain today - 36.📋 Which list tag shows 1, 2, 3 numbers? (a) <ul> (b) <ol> (c) <li>
- 37.🌐 Which one is where we type code? (a) a web server (b) a code editor (c) a web browser
- 38.True or false: in <img>, src names the picture file. (a) False (b) True
-
39.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> -->
<p>My pets</p> (a) I love mangoes. (b) My pets (c) Fun facts (d) Cricket is fun. - 40.🌐 Which one stores a website’s files? (a) a web server (b) a web browser (c) a code editor
Answer key
- Cricket is fun.
- to describe the image
- Maths fun
- 2
- </b>
- <li>
- <img>
- <h4>
- 2
- 5
- <li>
- on the browser tab
- False
- in the head
- True
- <h3>
- <hr>
- 2
- Match report
- <h1>
- <img>
- Yes
- True
- https://example.com
- is where we type code
- <ol>
- 3
- A red kite
- <h1>
- <h1>
- <ul>
- 2
- <!DOCTYPE html>
- 1
- I love mangoes.
- <ol>
- a code editor
- True
- I love mangoes.
- a web server
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids