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.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) ( (d) [
- 2.Which of these goes in the body? (a) <h1> (b) <style> (c) <meta charset="utf-8"> (d) <link rel="stylesheet">
- 3.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h6> or <h1>? (a) <h2> (b) <h5> (c) <h6> (d) <h1>
-
4.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="350"> (a) A happy dog (b) Birthday cake (c) cake.jpg (d) width -
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) width (b) A tiger asleep (c) A red kite (d) tiger.jpg -
6.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Our school trip</p>
<h2>I love mangoes.</h2>
<h2>Fun facts</h2>
<h2>Cricket is fun.</h2>
<h2>My pets</h2> - 7.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ol> (c) <br> (d) <ul>
-
8.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p> (a) Cricket is fun. (b) Hello, world! (c) Rain today - 9.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 10.🖼️ Which attribute of <img> describes the picture? (a) width (b) height (c) alt (d) src
- 11.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) src (d) width
- 12.🏷️ Is </body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 13.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 14.Which of these is an empty tag? (a) <li> (b) <img> (c) <h1> (d) <b>
- 15.Which of these is a closing tag? (a) <body> (b) <b> (c) </title> (d) <li>
- 16.🌐 Which one hosts websites online? (a) a web server (b) a code editor (c) a web browser
- 17.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
18.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="350"> (a) fort.jpg (b) A tiger asleep (c) An old fort (d) width - 19.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
-
20.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h4>Our school trip</h4>
<p>My best friend</p> - 21.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
- 22.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
-
23.🔗 Which address opens when you click this link?
<a href="news.html">Visit the site</a> (a) Visit the site (b) games.html (c) news.html (d) quiz.html -
24.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="400"> - 25.True or false: <li> is an unordered list. (a) True (b) False
- 26.True or false: HTML on its own cannot pick a random number. (a) True (b) False
- 27.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b/> (c) <b> (d) <\b>
- 28.🔢 In a basic web page file, which comes first: “</body>” or “</html>”? (a) </html> (b) </body>
- 29.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 10 (c) 6 (d) 3
-
30.🔍 One closing tag is missing. Which one?
<strong>Good morning!</strong>
<i>My best friend</i>
<p>Rain today (a) </u> (b) </i> (c) </p> (d) </strong> - 31.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h6> or <h3>? (a) <h1> (b) <h6> (c) <h3> (d) <h2>
- 32.🔢 In a basic web page file, which comes first: “</head>” or “</html>”? (a) </head> (b) </html>
- 33.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as a new line (d) as one space
- 34.💬 Does the browser show comments on the page? (a) No (b) Yes
-
35.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="200"> - 36.Which of these is an opening tag? (a) <h1> (b) </body> (c) </li> (d) </h1>
-
37.🔍 One closing tag is missing. Which one?
<p>My pets
<h2>Hello, world!</h2>
<small>Cricket is fun.</small> (a) </p> (b) </small> (c) </u> (d) </h2> - 38.Which of these is a closing tag? (a) <b> (b) <title> (c) </li> (d) <li>
-
39.📄 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>Here is my best one.</p>
</body>
</html> (a) Riya’s Recipes (b) index.html (c) Here is my best one. (d) Match report - 40.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <html> (d) <head>
Answer key
- <
- <h1>
- <h1>
- Birthday cake
- A tiger asleep
- 2
- <ol>
- Hello, world!
- has a closing tag
- alt
- src
- a closing tag
- Yes
- <img>
- </title>
- a web server
- an opening tag
- An old fort
- <li>
- 2
- a code editor
- a web browser
- news.html
- 400
- False
- True
- </b>
- </body>
- 1
- </p>
- <h6>
- </head>
- as one space
- No
- 200
- <h1>
- </p>
- </li>
- Riya’s Recipes
- <!DOCTYPE html>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids