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 attribute holds the address of a link? (a) src (b) href (c) id (d) alt
-
2.🔗 Which words do you click on?
<a href="contact.html">Take the quiz</a> (a) href (b) contact.html (c) Take the quiz (d) Play games - 3.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h6> or <h3>? (a) <h2> (b) <h5> (c) <h3> (d) <h6>
-
4.🔍 One closing tag is missing. Which one?
<u>Cricket is fun.</u>
<h2>Rain today
<i>Fun facts</i> (a) </u> (b) </i> (c) </p> (d) </h2> -
5.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Cricket is fun.</p>
<p>Fun facts</p>
<p>The red kite</p> - 6.Which of these is an empty tag? (a) <title> (b) <b> (c) <p> (d) <hr>
- 7.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the body (d) the title
-
8.🔗 Which address opens when you click this link?
<a href="about.html">School news</a> (a) about.html (b) https://example.com (c) School news (d) contact.html - 9.Which of these goes in the head? (a) <h1> (b) <img> (c) <a> (d) <meta charset="utf-8">
- 10.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
- 11.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it blank (d) makes it bold
-
12.🔍 One closing tag is missing. Which one?
<i>The red kite</i>
<p>Cricket is fun.</p>
<b>Hello, world! (a) </b> (b) </i> (c) </h3> (d) </p> -
13.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>I love mangoes.</p>
<p>My best friend</p> -
14.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>My best friend</p> -->
<p>Our school trip</p> - 15.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) in a big heading (d) nowhere
- 16.True or false: <ul> is one item of a list. (a) True (b) False
-
17.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) href (b) Play games (c) Take the quiz (d) about.html - 18.📋 Which list tag lists steps in order? (a) <ul> (b) <li> (c) <ol>
-
19.🔍 One closing tag is missing. Which one?
<b>Fun facts</b>
<h1>Hello, world!
<h2>My pets</h2> (a) </h1> (b) </h2> (c) </b> (d) </h3> -
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) cake.jpg (b) A happy dog (c) Birthday cake (d) width - 21.Which of these is true of a web browser? (a) saves our .html files (b) is where we type code (c) has an address bar (d) shows line numbers
-
22.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h4>Rain today</h4>
<p>Hello, world!</p>
<h3>Our school trip</h3> - 23.True or false: in <img>, alt shows if the image fails. (a) True (b) False
- 24.🏷️ Which is the closing tag for <p>? (a) <p> (b) <p/> (c) <\p> (d) </p>
-
25.🔗 Where does this link open?
<a href="art.html">Play games</a> (a) in a new tab (b) in the same tab - 26.Which of these is true of a web server? (a) answers page requests (b) turns HTML into a page (c) shows line numbers (d) colours code to help us
- 27.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
28.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p>
<p>My best friend</p>
<!-- <p>Rain today</p> --> -
29.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h2>Hello, world!</h2>
<h4>The red kite</h4>
<p>I love mangoes.</p>
<p>Good morning!</p> -
30.🔍 One closing tag is missing. Which one?
<em>The red kite</em>
<small>I love mangoes.</small>
<h3>Rain today (a) </h3> (b) </h2> (c) </em> (d) </small> - 31.💬 How does an HTML comment start? (a) // (b) # (c) <!-- (d) /*
-
32.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<h2>My pets</h2>
<h3>Good morning!</h3>
<p>The red kite</p>
<p>I love mangoes.</p> - 33.True or false: in <img>, height tells which image to load. (a) False (b) True
-
34.🔗 Where does this link open?
<a href="contact.html">About us</a> (a) in the same tab (b) in a new tab -
35.🔗 Where does this link open?
<a href="maths.html" target="_blank">School news</a> (a) in the same tab (b) in a new tab - 36.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 37.True or false: <title> goes in the head. (a) False (b) True
-
38.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) Visit the site (b) Contact us (c) href (d) games.html - 39.📋 Which list tag is an ordered list? (a) <ul> (b) <ol> (c) <li>
-
40.🔍 One closing tag is missing. Which one?
<i>My pets
<strong>My best friend</strong>
<b>Rain today</b> (a) </small> (b) </b> (c) </i> (d) </strong>
Answer key
- href
- Take the quiz
- <h2>
- </h2>
- 3
- <hr>
- the body
- about.html
- <meta charset="utf-8">
- <li>
- opens it in a new tab
- </b>
- 1
- 1
- on the browser tab
- False
- Take the quiz
- <ol>
- </h1>
- Birthday cake
- has an address bar
- 3
- True
- </p>
- in the same tab
- answers page requests
- Yes
- 2
- 3
- </h3>
- <!--
- 3
- False
- in the same tab
- in a new tab
- an opening tag
- True
- Contact us
- <ol>
- </i>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids