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 part holds everything you see on the page? (a) the head (b) the title (c) the doctype (d) the body
- 2.📝 What does <hr> draw? (a) a picture (b) a line across the page (c) a table (d) a link
- 3.🔍 Which is the odd one out? (a) stores a website’s files (b) sends pages over the net (c) hosts websites online (d) turns HTML into a page
- 4.🔠 Which heading shows the SMALLEST text: <h5>, <h6>, <h3> or <h1>? (a) <h1> (b) <h5> (c) <h3> (d) <h6>
- 5.True or false: in <img>, src names the picture file. (a) True (b) False
- 6.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
- 7.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
- 8.Which of these is true of a code editor? (a) shows pages from the web (b) answers page requests (c) opens web pages for us (d) colours code to help us
- 9.🔍 Which is the odd one out? (a) shows pages from the web (b) turns HTML into a page (c) stores a website’s files (d) has an address bar
-
10.🔍 Which line is missing its closing tag?
line 1: <b>I love mangoes.</b>
line 2: <i>My best friend</i>
line 3: <h1>Good morning! (a) line 2 (b) line 3 (c) line 1 - 11.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
-
12.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="250"> (a) Our school bus (b) bus.jpg (c) tiger.jpg (d) fort.jpg - 13.🏷️ HTML marks up text using ___. (a) pixels (b) tags (c) keys (d) wires
-
14.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing<br>Roses are red</p> - 15.📝 What do we need to write HTML? (a) a plain text editor (b) a paintbrush (c) a printer (d) a microphone
- 16.📄 Can HTML on its own make a form? (a) Yes (b) No
- 17.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
18.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<p>Cricket is fun.</p>
<p>Good morning!</p> (a) Rain today (b) Cricket is fun. (c) Good morning! (d) The red kite - 19.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <link about.html>
-
20.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h4>Our school trip</h4>
<h2>Good morning!</h2>
<h4>Our school trip</h4>
<p>Good morning!</p> - 21.📋 Which list tag is one item of a list? (a) <ul> (b) <li> (c) <ol>
- 22.📋 Which list tag is an ordered list? (a) <ol> (b) <li> (c) <ul>
-
23.🔗 Which address opens when you click this link?
<a href="games.html">Play games</a> (a) Play games (b) about.html (c) contact.html (d) games.html -
24.🔗 Which address opens when you click this link?
<a href="games.html">School news</a> (a) contact.html (b) games.html (c) about.html (d) School news - 25.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
-
26.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="350"> (a) moon.png (b) dog.jpg (c) cake.jpg (d) Birthday cake - 27.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 28.True or false: <input> has a closing tag. (a) True (b) False
- 29.True or false: HTML on its own can add up two numbers. (a) False (b) True
-
30.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>My pets</p>
<p>Our school trip</p>
<p>I love mangoes.</p>
<h2>My best friend</h2>
<p>I love mangoes.</p> - 31.True or false: in <img>, src sets how wide it is. (a) False (b) True
- 32.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h3> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h3>
- 33.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to describe the image (d) to colour it
- 34.💬 Does the browser show comments on the page? (a) Yes (b) No
- 35.Which of these goes in the head? (a) <img> (b) <a> (c) <h1> (d) <link rel="stylesheet">
- 36.Which of these is an opening tag? (a) </b> (b) </title> (c) <body> (d) </h1>
- 37.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
-
38.🔗 Which words do you click on?
<a href="art.html">Contact us</a> (a) Contact us (b) href (c) art.html (d) Visit the site -
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="100"> (a) width (b) moon.png (c) The full moon (d) Our school bus -
40.🔗 Where does this link open?
<a href="about.html" target="_blank">Take the quiz</a> (a) in the same tab (b) in a new tab
Answer key
- the body
- a line across the page
- turns HTML into a page
- <h6>
- True
- False
- False
- colours code to help us
- stores a website’s files
- line 3
- <a>
- bus.jpg
- tags
- 3
- a plain text editor
- Yes
- has a closing tag
- The red kite
- <a href="about.html">
- 4
- <li>
- <ol>
- games.html
- games.html
- element
- cake.jpg
- Yes
- False
- False
- 5
- False
- <h5>
- to describe the image
- No
- <link rel="stylesheet">
- <body>
- -->
- Contact us
- The full moon
- in a new tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids