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.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Roses are red<br>Sky is blue<br>Kites fly high</p> -
2.🔗 Which address opens when you click this link?
<a href="about.html">Play games</a> (a) https://example.com (b) about.html (c) Play games (d) contact.html -
3.🔍 Which line is missing its closing tag?
line 1: <h1>My pets</h1>
line 2: <em>Hello, world!</em>
line 3: <strong>Fun facts (a) line 3 (b) line 1 (c) line 2 - 4.🧱 HTML gives a web page its ___. (a) colours (b) speed (c) structure (d) sound
- 5.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 4 (d) 10
-
6.🔗 Where does this link open?
<a href="contact.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab -
7.🔗 Which words do you click on?
<a href="https://example.com">Visit the site</a> (a) Visit the site (b) https://example.com (c) Maths fun (d) href - 8.True or false: a code editor is where we type code. (a) True (b) False
-
9.🔗 Where does this link open?
<a href="art.html" target="_blank">School news</a> (a) in a new tab (b) in the same tab -
10.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) dog.jpg (b) A happy dog (c) The full moon (d) width -
11.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Planets</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Class 7 Blog (b) Here is my best one. (c) body (d) Planets -
12.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="150"> (a) moon.png (b) width (c) The full moon (d) Our school bus - 13.📄 Can HTML on its own make headings? (a) No (b) Yes
- 14.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
- 15.📋 Which tag goes around each item of a list? (a) <ul> (b) <p> (c) <ol> (d) <li>
- 16.🏷️ Which is the closing tag for <i>? (a) </i> (b) <i> (c) <i/> (d) <\i>
-
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="300"> (a) width (b) tiger.jpg (c) A tiger asleep (d) A red kite - 18.🏷️ Which is the closing tag for <p>? (a) <p> (b) </p> (c) <p/> (d) <\p>
- 19.True or false: <title> goes in the head. (a) False (b) True
- 20.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h1> or <h6>? (a) <h6> (b) <h3> (c) <h2> (d) <h1>
- 21.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 22.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
23.🔗 Which address opens when you click this link?
<a href="contact.html">Take the quiz</a> (a) Take the quiz (b) contact.html (c) https://example.com (d) maths.html -
24.🔍 One closing tag is missing. Which one?
<h3>Good morning!
<u>My pets</u>
<em>My best friend</em> (a) </strong> (b) </em> (c) </h3> (d) </u> - 25.Which of these has a closing tag? (a) <img> (b) <hr> (c) <meta> (d) <p>
- 26.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
- 27.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
- 28.🏷️ Which is the closing tag for <b>? (a) <b/> (b) <b> (c) <\b> (d) </b>
-
29.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Rain today</p>
<!-- <p>Fun facts</p> --> (a) The red kite (b) Fun facts (c) Rain today - 30.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h6>? (a) <h6> (b) <h5> (c) <h3> (d) <h2>
- 31.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <a> (d) <img>
-
32.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Rain today</p> -->
<p>Fun facts</p>
<p>The red kite</p> (a) Rain today (b) My pets (c) Fun facts (d) The red kite -
33.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) dog.jpg (b) The full moon (c) width (d) A happy dog - 34.True or false: in <img>, src tells which image to load. (a) False (b) True
-
35.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<p>Our school trip</p>
<p>Rain today</p>
<p>Good morning!</p> - 36.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h4>? (a) <h5> (b) <h1> (c) <h4> (d) <h6>
- 37.🔍 Which is the odd one out? (a) opens web pages for us (b) turns HTML into a page (c) has an address bar (d) is where we type code
- 38.🌐 Which one colours code to help us? (a) a code editor (b) a web browser (c) a web server
-
39.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="400"> (a) cake.jpg (b) dog.jpg (c) moon.png (d) Birthday cake -
40.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Good morning!</p>
<h2>Hello, world!</h2>
Answer key
- 4
- about.html
- line 3
- structure
- 6
- in a new tab
- Visit the site
- True
- in a new tab
- A happy dog
- Planets
- The full moon
- Yes
- a web browser
- <li>
- </i>
- A tiger asleep
- </p>
- True
- <h6>
- Yes
- an empty tag
- contact.html
- </h3>
- <p>
- a slash /
- <ol>
- </b>
- Fun facts
- <h2>
- <a>
- Rain today
- A happy dog
- True
- 4
- <h1>
- is where we type code
- a code editor
- cake.jpg
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids