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.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to add colour (d) to leave notes
-
2.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) news.html (b) Maths fun (c) href (d) Visit the site - 3.Which of these goes in the head? (a) <ul> (b) <a> (c) <p> (d) <style>
-
4.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>The red kite</p>
<p>Good morning!</p> - 5.Which of these is an opening tag? (a) <h1> (b) </b> (c) </title> (d) </p>
-
6.🔗 Where does this link open?
<a href="news.html" target="_blank">Contact us</a> (a) in a new tab (b) in the same tab -
7.🔗 Where does this link open?
<a href="maths.html" target="_blank">Art corner</a> (a) in the same tab (b) in a new tab - 8.Which of these has a closing tag? (a) <br> (b) <img> (c) <ul> (d) <meta>
- 9.🌐 Which one stores a website’s files? (a) a web server (b) a web browser (c) a code editor
- 10.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <input> (d) <p>
-
11.🔗 Which words do you click on?
<a href="quiz.html">School news</a> (a) Take the quiz (b) quiz.html (c) href (d) School news -
12.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) Birthday cake (b) A happy dog (c) width (d) cake.jpg - 13.Which of these is an empty tag? (a) <input> (b) <h1> (c) <li> (d) <b>
- 14.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a hash # (c) a dot . (d) a slash /
- 15.True or false: in <img>, width sets how wide it is. (a) True (b) False
-
16.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Easy snacks (b) index.html (c) We won by 5 runs. (d) Riya’s Recipes - 17.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 18.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) { (d) [
- 19.🌐 Which one turns HTML into a page? (a) a code editor (b) a web browser (c) a web server
- 20.📝 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 one space (d) as a new line
-
21.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>My pets</p> -->
<!-- <p>I love mangoes.</p> -->
<!-- <p>Our school trip</p> -->
<!-- <p>Good morning!</p> --> -
22.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p>
<p>My pets</p>
<!-- <p>Cricket is fun.</p> --> - 23.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 3 (d) 1
- 24.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h1> or <h5>? (a) <h5> (b) <h1> (c) <h3> (d) <h2>
-
25.🔗 Where does this link open?
<a href="maths.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab - 26.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h5> or <h1>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
-
27.🔗 Which words do you click on?
<a href="contact.html">Visit the site</a> (a) href (b) contact.html (c) Visit the site (d) Maths fun -
28.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>The red kite</p>
<h3>My pets</h3>
<p>I love mangoes.</p>
<p>My pets</p> - 29.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
30.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Guava</li>
</ol> (a) bullets (b) numbers -
31.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="400"> -
32.🔗 Which words do you click on?
<a href="quiz.html">Art corner</a> (a) Art corner (b) quiz.html (c) href (d) School news - 33.📝 What do we need to write HTML? (a) a microphone (b) a plain text editor (c) a paintbrush (d) a printer
-
34.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="350"> (a) The full moon (b) Our school bus (c) moon.png (d) width -
35.🔗 Where does this link open?
<a href="about.html" target="_blank">About us</a> (a) in a new tab (b) in the same tab - 36.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ul> (d) <ol>
- 37.True or false: <ul> goes in the head. (a) False (b) True
-
38.📋 What number does the browser show next to “Mango”?
<ol>
<li>Banana</li>
<li>Guava</li>
<li>Grapes</li>
<li>Mango</li>
</ol> -
39.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Sky is blue<br>Rivers flow<br>Stars shine<br>Roses are red</p> -
40.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>My pets</p>
<p>Rain today</p> (a) Rain today (b) I love mangoes. (c) My pets
Answer key
- to leave notes
- Visit the site
- <style>
- 3
- <h1>
- in a new tab
- in a new tab
- <ul>
- a web server
- <p>
- School news
- Birthday cake
- <input>
- a slash /
- True
- Riya’s Recipes
- has a closing tag
- <
- a web browser
- as one space
- 1
- 2
- 1
- <h1>
- in a new tab
- <h5>
- Visit the site
- 2
- an opening tag
- numbers
- 400
- Art corner
- a plain text editor
- The full moon
- in a new tab
- <li>
- False
- 4
- 5
- I love mangoes.
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids