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 paragraphs does this code make?
<p>My pets</p>
<p>Cricket is fun.</p>
<p>Our school trip</p>
<p>Fun facts</p>
<p>The red kite</p>
<p>Rain today</p> -
2.🔗 Which words do you click on?
<a href="about.html">About us</a> (a) about.html (b) Contact us (c) About us (d) href - 3.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
-
4.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> (a) width (b) A red kite (c) tiger.jpg (d) A tiger asleep -
5.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<!-- <p>My best friend</p> -->
<p>Hello, world!</p>
<p>Fun facts</p> - 6.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 7.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour
- 8.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
-
9.📋 What number does the browser show next to “Grapes”?
<ol start="8">
<li>Banana</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Guava</li>
</ol> - 10.True or false: <img> goes in the head. (a) True (b) False
-
11.🔗 Which address opens when you click this link?
<a href="quiz.html">School news</a> (a) games.html (b) about.html (c) School news (d) quiz.html -
12.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) maths.html (b) href (c) Play games (d) Take the quiz - 13.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h4> or <h5>? (a) <h4> (b) <h2> (c) <h5> (d) <h1>
- 14.Which of these is an opening tag? (a) </body> (b) <body> (c) </li> (d) </h1>
-
15.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Grapes</li>
<li>Orange</li>
<li>Guava</li>
<li>Banana</li>
<li>Litchi</li>
</ul> -
16.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="200"> (a) moon.png (b) The full moon (c) Our school bus (d) width - 17.🌐 Which one colours code to help us? (a) a web server (b) a code editor (c) a web browser
- 18.Which of these is an opening tag? (a) </li> (b) </p> (c) </b> (d) <p>
- 19.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
- 20.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
-
21.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p> - 22.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) HyperText (c) Hot Tags (d) Home Text
- 23.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <\h2> (d) <h2>
- 24.Which of these goes in the body? (a) <p> (b) <style> (c) <title> (d) <link rel="stylesheet">
-
25.🔗 Which words do you click on?
<a href="about.html">Visit the site</a> (a) href (b) Maths fun (c) about.html (d) Visit the site -
26.💬 How many paragraphs show on the page?
<!-- <p>Our school trip</p> -->
<!-- <p>I love mangoes.</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p> - 27.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) attribute (d) editor
-
28.🔗 Which words do you click on?
<a href="news.html">Art corner</a> (a) news.html (b) href (c) School news (d) Art corner - 29.🌐 Which one shows pages from the web? (a) a code editor (b) a web server (c) a web browser
- 30.📄 Can HTML on its own keep a high score? (a) No (b) Yes
- 31.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h4>? (a) <h1> (b) <h4> (c) <h3> (d) <h5>
- 32.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
33.🔍 One closing tag is missing. Which one?
<small>Hello, world!</small>
<b>Fun facts</b>
<strong>Our school trip (a) </em> (b) </strong> (c) </small> (d) </b> - 34.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) turns HTML into a page (d) stores a website’s files
-
35.🔗 Which words do you click on?
<a href="contact.html">Maths fun</a> (a) Maths fun (b) href (c) contact.html (d) Art corner -
36.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Cricket is fun.</p>
<h2>The red kite</h2>
<h3>Cricket is fun.</h3> -
37.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>My best friend</p> -->
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<p>I love mangoes.</p> -
38.🔗 Where does this link open?
<a href="news.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab - 39.True or false: a code editor has an address bar. (a) False (b) True
- 40.📝 What does <br> do? (a) makes text bold (b) makes a list (c) adds a picture (d) starts a new line
Answer key
- 6
- About us
- in the head
- A tiger asleep
- 3
- in the head
- to leave notes
- <li>
- 10
- False
- quiz.html
- Take the quiz
- <h5>
- <body>
- 6
- The full moon
- a code editor
- <p>
- a slash /
- <ul>
- 1
- HyperText
- </h2>
- <p>
- Visit the site
- 1
- element
- Art corner
- a web browser
- No
- <h5>
- has a closing tag
- </strong>
- stores a website’s files
- Maths fun
- 3
- 3
- in a new tab
- False
- starts a new line
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids