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 does an HTML comment start? (a) /* (b) <!-- (c) // (d) #
-
2.🔗 Which words do you click on?
<a href="art.html">About us</a> (a) art.html (b) href (c) About us (d) Contact us -
3.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>Fun facts</p>
<p>I love mangoes.</p>
<!-- <p>The red kite</p> --> - 4.🔍 Which is the odd one out? (a) answers page requests (b) has an address bar (c) opens web pages for us (d) turns HTML into a page
-
5.🔗 Where does this link open?
<a href="art.html">Maths fun</a> (a) in the same tab (b) in a new tab -
6.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="400"> (a) tiger.jpg (b) kite.png (c) fort.jpg (d) An old fort - 7.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) width (c) height (d) alt
- 8.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 9.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
-
10.🔠 How many headings are in this code?
<h1>My pets</h1>
<h2>Our school trip</h2>
<h2>The red kite</h2>
<p>My best friend</p> -
11.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Litchi</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Guava</li>
</ol> - 12.📄 Can HTML on its own make tables? (a) No (b) Yes
-
13.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Stars shine</p> - 14.🌐 Which one hosts websites online? (a) a web browser (b) a code editor (c) a web server
- 15.🏷️ Which is the closing tag for <b>? (a) <b> (b) <\b> (c) </b> (d) <b/>
-
16.🔍 Which line is missing its closing tag?
line 1: <i>Hello, world!</i>
line 2: <small>Fun facts</small>
line 3: <h2>My pets (a) line 2 (b) line 3 (c) line 1 - 17.Which of these has a closing tag? (a) <meta> (b) <ul> (c) <img> (d) <input>
- 18.True or false: HTML on its own can make bullet lists. (a) False (b) True
- 19.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 3 (d) 10
-
20.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) games.html (b) Visit the site (c) Contact us (d) href - 21.🔠 Which heading shows the SMALLEST text: <h5>, <h3>, <h1> or <h4>? (a) <h4> (b) <h1> (c) <h3> (d) <h5>
- 22.🌐 Which one saves our .html files? (a) a web server (b) a web browser (c) a code editor
- 23.🏷️ Which is the closing tag for <h3>? (a) <h3> (b) <\h3> (c) </h3> (d) <h3/>
- 24.True or false: <li> shows bullet points. (a) False (b) True
-
25.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets -
26.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) index.html (c) All about me (d) My Hobbies - 27.📝 What does <hr> draw? (a) a link (b) a line across the page (c) a table (d) a picture
- 28.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 29.Which of these is a closing tag? (a) <p> (b) <h1> (c) </b> (d) <body>
- 30.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a hash # (d) a slash /
- 31.🔤 In “HTML”, what does the L stand for? (a) Language (b) Link (c) Laptop (d) Line
- 32.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h6>? (a) <h5> (b) <h6> (c) <h1> (d) <h4>
- 33.🔢 In a basic web page file, which comes first: “<html>” or “<head>”? (a) <head> (b) <html>
- 34.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 35.🌐 Which one stores a website’s files? (a) a web server (b) a web browser (c) a code editor
- 36.📄 Can HTML on its own make a form? (a) Yes (b) No
- 37.True or false: <ol> shows bullet points. (a) True (b) False
- 38.Which of these is a closing tag? (a) <p> (b) <body> (c) <title> (d) </title>
-
39.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h4>My best friend</h4>
<p>Hello, world!</p> -
40.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Art Gallery (b) Here is my best one. (c) body (d) All about me
Answer key
- <!--
- About us
- 3
- answers page requests
- in the same tab
- fort.jpg
- width
- No
- in the body
- 3
- 5
- Yes
- 2
- a web server
- </b>
- line 3
- <ul>
- True
- 1
- Contact us
- <h5>
- a code editor
- </h3>
- False
- bullets
- My Hobbies
- a line across the page
- a closing tag
- </b>
- a slash /
- Language
- <h6>
- <html>
- a closing tag
- a web server
- Yes
- False
- </title>
- 2
- All about me
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids