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 of these is true of a web browser? (a) has an address bar (b) colours code to help us (c) is where we type code (d) sends pages over the net
- 2.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 3.Which of these is true of a code editor? (a) shows pages from the web (b) colours code to help us (c) hosts websites online (d) answers page requests
- 4.Which of these is an empty tag? (a) <hr> (b) <h1> (c) <title> (d) <b>
- 5.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
-
6.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>My pets</p>
<p>The red kite</p>
<!-- <p>Fun facts</p> --> (a) Hello, world! (b) The red kite (c) Fun facts (d) My pets - 7.💬 Does the browser show comments on the page? (a) Yes (b) No
-
8.🔍 One closing tag is missing. Which one?
<p>Good morning!</p>
<h2>Our school trip</h2>
<h1>Fun facts (a) </p> (b) </h2> (c) </h1> (d) </u> - 9.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h5> or <h4>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
-
10.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> --> (a) I love mangoes. (b) Cricket is fun. (c) My pets - 11.True or false: a web browser has an address bar. (a) True (b) False
-
12.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Litchi</li>
<li>Jamun</li>
</ol> - 13.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<head>”? (a) <!DOCTYPE html> (b) <head>
-
14.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Good morning!</p>
<p>Hello, world!</p>
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p> - 15.True or false: <h1> is an empty tag. (a) True (b) False
- 16.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
- 17.📄 Can HTML on its own keep a high score? (a) Yes (b) No
-
18.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Banana</li>
</ul> -
19.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Stars shine</p> -
20.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Stars shine<br>Roses are red</p> - 21.True or false: HTML on its own cannot keep a high score. (a) False (b) True
- 22.Which of these is a closing tag? (a) <li> (b) <p> (c) <body> (d) </body>
-
23.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<h2>My pets</h2>
<p>Rain today</p> -
24.🔗 Which words do you click on?
<a href="https://example.com">Take the quiz</a> (a) https://example.com (b) href (c) Play games (d) Take the quiz -
25.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) Match report (c) I like to read. (d) Riya’s Recipes - 26.🔗 Which attribute holds the address of a link? (a) id (b) alt (c) src (d) href
- 27.True or false: <ol> shows 1, 2, 3 numbers. (a) False (b) True
- 28.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 1 (d) 3
-
29.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Cricket Club (b) body (c) Easy snacks (d) Here is my best one. -
30.🔗 Where does this link open?
<a href="contact.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab - 31.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <body> (d) <head>
-
32.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Rivers flow<br>Birds sing</p> - 33.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h2>? (a) <h4> (b) <h3> (c) <h2> (d) <h1>
- 34.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to make it bigger (d) to describe the image
-
35.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>My best friend</p>
<p>Good morning!</p>
<p>Hello, world!</p> (a) Rain today (b) Hello, world! (c) My best friend (d) Good morning! -
36.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Fun facts</p>
<!-- <p>The red kite</p> --> (a) Cricket is fun. (b) Fun facts (c) The red kite - 37.Which of these has a closing tag? (a) <meta> (b) <img> (c) <title> (d) <input>
- 38.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h3> (d) <h6>
-
39.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Hello, world!</p>
<p>My best friend</p>
<!-- <p>I love mangoes.</p> --> - 40.🔍 Which is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) answers page requests (d) has an address bar
Answer key
- has an address bar
- an opening tag
- colours code to help us
- <hr>
- in the body
- Fun facts
- No
- </h1>
- <h1>
- I love mangoes.
- True
- 3
- <!DOCTYPE html>
- 4
- False
- <h5>
- No
- 2
- 3
- 3
- True
- </body>
- 2
- Take the quiz
- Riya’s Recipes
- href
- True
- 1
- Easy snacks
- in a new tab
- <!DOCTYPE html>
- 3
- <h4>
- to describe the image
- Rain today
- The red kite
- <title>
- <h6>
- 3
- answers page requests
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids