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.🌐 Which one turns HTML into a page? (a) a code editor (b) a web server (c) a web browser
-
2.📄 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>Here is my best one.</p>
</body>
</html> (a) index.html (b) All about me (c) Here is my best one. (d) My Hobbies -
3.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>I love mangoes.</p>
<p>My pets</p>
<h2>Cricket is fun.</h2>
<p>Fun facts</p>
<p>Rain today</p> -
4.🔗 Which words do you click on?
<a href="contact.html">Take the quiz</a> (a) contact.html (b) Take the quiz (c) Play games (d) href - 5.Which of these is an empty tag? (a) <title> (b) <hr> (c) <p> (d) <b>
- 6.Which of these is true of a web server? (a) hosts websites online (b) has an address bar (c) opens web pages for us (d) turns HTML into a page
-
7.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Grapes</li>
<li>Banana</li>
</ul> - 8.True or false: in <img>, src is read by screen readers. (a) True (b) False
- 9.Which of these is an empty tag? (a) <p> (b) <title> (c) <b> (d) <input>
- 10.🌍 Which program shows a web page to us? (a) a web browser (b) a music player (c) a paint program (d) a calculator
- 11.True or false: a code editor has an address bar. (a) False (b) True
- 12.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
13.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>My best friend</p>
<p>Rain today</p> (a) My best friend (b) Rain today (c) Good morning! - 14.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a new line (d) as a dot
- 15.True or false: in <img>, height describes the picture. (a) True (b) False
- 16.Which of these has a closing tag? (a) <br> (b) <hr> (c) <img> (d) <title>
-
17.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Jamun</li>
</ul> (a) numbers (b) bullets -
18.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>My best friend</p>
<p>I love mangoes.</p>
<!-- <p>Fun facts</p> -->
<p>The red kite</p> - 19.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
20.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Good morning!</p>
<p>I love mangoes.</p> (a) Good morning! (b) I love mangoes. (c) My best friend - 21.Which of these goes in the body? (a) <title> (b) <style> (c) <h1> (d) <link rel="stylesheet">
-
22.🔍 One closing tag is missing. Which one?
<em>Rain today</em>
<h1>My pets
<u>Cricket is fun.</u> (a) </h1> (b) </em> (c) </b> (d) </u> - 23.True or false: a web server saves our .html files. (a) True (b) False
-
24.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Good morning!</p>
<!-- <p>My pets</p> --> (a) The red kite (b) Good morning! (c) My pets -
25.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<!-- <p>Fun facts</p> --> - 26.Which of these is an opening tag? (a) </title> (b) </b> (c) <li> (d) </p>
-
27.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Papaya</li>
</ol> (a) numbers (b) bullets - 28.💬 Does the browser show comments on the page? (a) Yes (b) No
- 29.Which of these is a closing tag? (a) <p> (b) <body> (c) <title> (d) </title>
-
30.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red<br>Birds sing<br>Sky is blue<br>Kites fly high</p> - 31.True or false: <ol> lists things in any order. (a) True (b) False
- 32.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <title> (d) <img>
- 33.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) width (c) src (d) height
- 34.Which of these is true of a web browser? (a) saves our .html files (b) hosts websites online (c) answers page requests (d) shows pages from the web
- 35.True or false: <ul> has a closing tag. (a) False (b) True
-
36.🔍 One closing tag is missing. Which one?
<h1>Hello, world!</h1>
<p>My pets</p>
<small>Rain today (a) </small> (b) </p> (c) </h1> (d) </h3> - 37.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
-
38.🔗 Where does this link open?
<a href="games.html">Art corner</a> (a) in a new tab (b) in the same tab -
39.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) My Hobbies (b) index.html (c) We won by 5 runs. (d) Welcome! - 40.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
Answer key
- a web browser
- My Hobbies
- 5
- Take the quiz
- <hr>
- hosts websites online
- 3
- False
- <input>
- a web browser
- False
- has a closing tag
- Good morning!
- as one space
- False
- <title>
- bullets
- 4
- has a closing tag
- My best friend
- <h1>
- </h1>
- False
- My pets
- 1
- <li>
- numbers
- No
- </title>
- 5
- False
- <img>
- width
- shows pages from the web
- True
- </small>
- to leave notes
- in the same tab
- My Hobbies
- an opening tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids