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.True or false: <h1> goes in the body. (a) False (b) True
-
2.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="300"> (a) A red kite (b) cake.jpg (c) kite.png (d) map.png -
3.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<h2>Good morning!</h2>
<h2>Rain today</h2>
<h2>My best friend</h2>
<p>My best friend</p>
<p>I love mangoes.</p> - 4.🏷️ Which is the closing tag for <small>? (a) </small> (b) <small/> (c) <\small> (d) <small>
- 5.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
- 6.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
-
7.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>All about me</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) body (b) Riya’s Recipes (c) All about me (d) We won by 5 runs. -
8.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>The red kite</p>
<h2>Rain today</h2>
<h2>Fun facts</h2>
<p>I love mangoes.</p>
<p>Fun facts</p> - 9.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <img> (d) <pic>
-
10.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="100"> - 11.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) <strong/> (c) </strong> (d) <strong>
- 12.Which of these is true of a web browser? (a) stores a website’s files (b) shows pages from the web (c) colours code to help us (d) shows line numbers
- 13.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
14.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> -->
<p>Our school trip</p> - 15.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h2> or <h3>? (a) <h1> (b) <h3> (c) <h2> (d) <h6>
- 16.📋 Which list suits a shopping list in any order? (a) <ol> (b) <hr> (c) <br> (d) <ul>
- 17.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
-
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) A red kite (b) width (c) tiger.jpg (d) A tiger asleep - 19.🔍 Which is the odd one out? (a) turns HTML into a page (b) colours code to help us (c) saves our .html files (d) is where we type code
-
20.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>My drawings</h1>
<p>I like to read.</p>
</body>
</html> (a) body (b) I like to read. (c) Cricket Club (d) My drawings -
21.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Our school trip</p>
<p>Rain today</p>
<p>My best friend</p> - 22.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
23.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) href (b) Maths fun (c) Visit the site (d) news.html - 24.True or false: a web server hosts websites online. (a) False (b) True
-
25.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Grapes</li>
</ul> (a) bullets (b) numbers - 26.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 27.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </head> (c) <head> (d) </html>
-
28.🔗 Which words do you click on?
<a href="art.html">About us</a> (a) href (b) art.html (c) Contact us (d) About us - 29.📄 Can HTML on its own make bullet lists? (a) Yes (b) No
- 30.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) shows pages from the web (d) hosts websites online
-
31.🔍 Which line is missing its closing tag?
line 1: <h3>Fun facts
line 2: <h1>Good morning!</h1>
line 3: <small>I love mangoes.</small> (a) line 2 (b) line 1 (c) line 3 - 32.Which of these is a closing tag? (a) <b> (b) <title> (c) <p> (d) </h1>
-
33.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Thanks for visiting. (b) My Hobbies (c) body (d) Match report - 34.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) Hot Tags (c) Home Text (d) High Tech
-
35.🔗 Which words do you click on?
<a href="art.html">Visit the site</a> (a) href (b) Maths fun (c) Visit the site (d) art.html -
36.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p> -
37.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Birds sing<br>Kites fly high</p> - 38.True or false: a web server is where we type code. (a) True (b) False
- 39.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <br> (d) <p>
-
40.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Orange</li>
</ol>
Answer key
- True
- kite.png
- 3
- </small>
- <!DOCTYPE html>
- <ul>
- All about me
- 4
- <img>
- 100
- </strong>
- shows pages from the web
- an opening tag
- 2
- <h6>
- <ul>
- on the browser tab
- A tiger asleep
- turns HTML into a page
- My drawings
- 3
- a closing tag
- Visit the site
- True
- bullets
- has a closing tag
- </html>
- About us
- Yes
- hosts websites online
- line 1
- </h1>
- Match report
- HyperText
- Visit the site
- 1
- 4
- False
- <h1>
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids