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 headings are in this code?
<h1>I love mangoes.</h1>
<p>Rain today</p>
<h3>The red kite</h3> - 2.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) alt (d) height
-
3.🔗 Where does this link open?
<a href="maths.html">Maths fun</a> (a) in a new tab (b) in the same tab -
4.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="150"> (a) fort.jpg (b) An old fort (c) tiger.jpg (d) kite.png -
5.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue<br>Birds sing</p> - 6.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
- 7.🖼️ Which attribute of <img> tells which image to load? (a) src (b) alt (c) height (d) width
-
8.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) body (c) My Hobbies (d) Welcome! -
9.🔍 Which line is missing its closing tag?
line 1: <small>Good morning!
line 2: <strong>I love mangoes.</strong>
line 3: <p>The red kite</p> (a) line 2 (b) line 1 (c) line 3 - 10.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 11.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 12.🔢 In a basic web page file, which comes first: “<body>” or “<head>”? (a) <body> (b) <head>
- 13.Which of these is true of a web browser? (a) stores a website’s files (b) shows line numbers (c) shows pages from the web (d) answers page requests
- 14.Which of these is true of a web browser? (a) shows line numbers (b) turns HTML into a page (c) saves our .html files (d) hosts websites online
- 15.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Machine (c) Markup (d) Mouse
-
16.🔍 Which line is missing its closing tag?
line 1: <strong>Our school trip</strong>
line 2: <h1>The red kite</h1>
line 3: <h2>Cricket is fun. (a) line 1 (b) line 3 (c) line 2 -
17.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab -
18.🔗 Where does this link open?
<a href="art.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab -
19.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<!-- <p>Good morning!</p> -->
<p>The red kite</p> - 20.🔍 Which is the odd one out? (a) answers page requests (b) hosts websites online (c) stores a website’s files (d) saves our .html files
- 21.True or false: in <img>, src names the picture file. (a) True (b) False
- 22.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) ( (d) {
- 23.🔍 Which is the odd one out? (a) turns HTML into a page (b) shows pages from the web (c) shows line numbers (d) opens web pages for us
- 24.📝 What does <p> make? (a) a picture (b) a link (c) a table (d) a paragraph
- 25.🔗 Which attribute holds the address of a link? (a) id (b) src (c) alt (d) href
- 26.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h1> or <h3>? (a) <h3> (b) <h1> (c) <h5> (d) <h4>
-
27.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<p>My best friend</p> (a) My best friend (b) My pets (c) I love mangoes. -
28.🔗 Where does this link open?
<a href="news.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab - 29.Which of these is true of a web server? (a) turns HTML into a page (b) has an address bar (c) opens web pages for us (d) answers page requests
-
30.🔗 Which words do you click on?
<a href="contact.html">About us</a> (a) contact.html (b) About us (c) Contact us (d) href -
31.🔗 Where does this link open?
<a href="news.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab -
32.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Good morning!</p>
<p>Hello, world!</p> -
33.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Grapes</li>
<li>Jamun</li>
</ol> (a) numbers (b) bullets - 34.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
- 35.True or false: in <img>, alt sets how tall it is. (a) False (b) True
- 36.Which of these goes in the head? (a) <h1> (b) <img> (c) <meta charset="utf-8"> (d) <table>
- 37.Which of these is true of a code editor? (a) colours code to help us (b) shows pages from the web (c) opens web pages for us (d) stores a website’s files
- 38.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h5> or <h4>? (a) <h5> (b) <h4> (c) <h3> (d) <h2>
- 39.True or false: <title> goes in the head. (a) False (b) True
- 40.💬 Does the browser show comments on the page? (a) Yes (b) No
Answer key
- 2
- alt
- in the same tab
- fort.jpg
- 3
- False
- src
- Welcome!
- line 1
- Yes
- a closing tag
- <head>
- shows pages from the web
- turns HTML into a page
- Markup
- line 3
- in a new tab
- in a new tab
- 2
- saves our .html files
- True
- <
- shows line numbers
- a paragraph
- href
- <h1>
- My pets
- in a new tab
- answers page requests
- About us
- in a new tab
- 2
- numbers
- -->
- False
- <meta charset="utf-8">
- colours code to help us
- <h2>
- True
- No
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids