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 text will NOT show on the page?
<p>Good morning!</p>
<p>Fun facts</p>
<!-- <p>Hello, world!</p> --> (a) Hello, world! (b) Fun facts (c) Good morning! - 2.💬 Does the browser show comments on the page? (a) Yes (b) No
-
3.🔍 One closing tag is missing. Which one?
<h2>Our school trip
<small>The red kite</small>
<u>My best friend</u> (a) </strong> (b) </h2> (c) </small> (d) </u> - 4.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
- 5.🖼️ Why do we add alt text to an image? (a) to describe the image (b) to colour it (c) to make it bigger (d) to load it faster
-
6.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Riya’s Recipes (b) body (c) All about me (d) Here is my best one. - 7.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
8.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Litchi</li>
<li>Jamun</li>
</ol> (a) numbers (b) bullets - 9.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <p> (d) <a>
- 10.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) width (c) alt (d) height
-
11.🔗 Which words do you click on?
<a href="quiz.html">School news</a> (a) Take the quiz (b) href (c) quiz.html (d) School news -
12.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>My best friend</p>
<!-- <p>I love mangoes.</p> --> (a) Hello, world! (b) My best friend (c) I love mangoes. - 13.Which of these is a closing tag? (a) <b> (b) <p> (c) <li> (d) </body>
- 14.True or false: a web browser has an address bar. (a) True (b) False
- 15.Which of these goes in the head? (a) <p> (b) <ul> (c) <link rel="stylesheet"> (d) <a>
- 16.Which of these has a closing tag? (a) <input> (b) <p> (c) <img> (d) <br>
- 17.Which of these goes in the body? (a) <title> (b) <table> (c) <meta charset="utf-8"> (d) <link rel="stylesheet">
-
18.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h3>My best friend</h3>
<h4>Cricket is fun.</h4>
<h2>Hello, world!</h2>
<h4>Our school trip</h4> - 19.True or false: in <img>, alt sets how tall it is. (a) False (b) True
- 20.True or false: a code editor shows line numbers. (a) True (b) False
- 21.Which of these is true of a web browser? (a) is where we type code (b) opens web pages for us (c) saves our .html files (d) sends pages over the net
-
22.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) All about me (b) Thanks for visiting. (c) index.html (d) Riya’s Recipes - 23.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h3> (d) <h1>
- 24.🌐 Which one is where we type code? (a) a web server (b) a code editor (c) a web browser
- 25.📄 Can HTML on its own make tables? (a) Yes (b) No
-
26.🔍 One closing tag is missing. Which one?
<h3>Fun facts</h3>
<em>Rain today</em>
<h1>Hello, world! (a) </p> (b) </h3> (c) </em> (d) </h1> - 27.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <head> (d) <body>
-
28.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>The red kite</p>
<p>Cricket is fun.</p>
<p>Rain today</p> (a) The red kite (b) Cricket is fun. (c) Rain today (d) My pets -
29.🔗 Where does this link open?
<a href="games.html" target="_blank">Contact us</a> (a) in the same tab (b) in a new tab - 30.📄 Can HTML on its own make links to pages? (a) No (b) Yes
- 31.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </head> (c) <html> (d) <body>
- 32.🌐 Which one colours code to help us? (a) a web browser (b) a web server (c) a code editor
- 33.Which of these is an empty tag? (a) <p> (b) <h1> (c) <img> (d) <ul>
-
34.📋 What number does the browser show next to “Papaya”?
<ol start="2">
<li>Mango</li>
<li>Papaya</li>
<li>Litchi</li>
</ol> -
35.🔗 Which words do you click on?
<a href="news.html">School news</a> (a) Take the quiz (b) href (c) news.html (d) School news - 36.🔗 Which attribute holds the address of a link? (a) alt (b) id (c) href (d) src
-
37.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Mango</li>
<li>Banana</li>
<li>Litchi</li>
</ol> - 38.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
- 39.🔢 In a basic web page file, which comes LAST? (a) <html> (b) <head> (c) </head> (d) </html>
- 40.Which of these is true of a web server? (a) has an address bar (b) shows pages from the web (c) sends pages over the net (d) turns HTML into a page
Answer key
- Hello, world!
- No
- </h2>
- on the browser tab
- to describe the image
- All about me
- Yes
- numbers
- <a>
- width
- School news
- I love mangoes.
- </body>
- True
- <link rel="stylesheet">
- <p>
- <table>
- 5
- False
- True
- opens web pages for us
- Riya’s Recipes
- <h6>
- a code editor
- Yes
- </h1>
- <!DOCTYPE html>
- My pets
- in a new tab
- Yes
- <!DOCTYPE html>
- a code editor
- <img>
- 3
- School news
- href
- 4
- <ol>
- </html>
- sends pages over the net
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids