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.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Good morning!</p>
<p>Cricket is fun.</p>
<h3>The red kite</h3>
<p>Fun facts</p> - 2.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
- 3.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
- 4.🖼️ Which tag puts a picture on a page? (a) <p> (b) <pic> (c) <a> (d) <img>
-
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) width (b) The full moon (c) A happy dog (d) dog.jpg - 6.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <img> (d) <link>
- 7.🖼️ Which attribute of <img> is read by screen readers? (a) width (b) height (c) alt (d) src
-
8.🔍 One closing tag is missing. Which one?
<h2>Our school trip
<u>Fun facts</u>
<small>My pets</small> (a) </small> (b) </strong> (c) </h2> (d) </u> - 9.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 10.🌐 Which one has an address bar? (a) a web server (b) a web browser (c) a code editor
-
11.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>My pets</p> -->
<p>Good morning!</p> - 12.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
-
13.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>My best friend</p> -->
<p>My pets</p>
<p>Fun facts</p> - 14.True or false: <br> has a closing tag. (a) True (b) False
-
15.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<!-- <p>My pets</p> -->
<p>I love mangoes.</p> - 16.🏷️ Which is the closing tag for <p>? (a) <p> (b) </p> (c) <p/> (d) <\p>
-
17.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h3>The red kite</h3>
<p>My best friend</p>
<p>Our school trip</p>
<h3>Rain today</h3> -
18.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>My best friend</p>
<h2>Hello, world!</h2>
<h2>Cricket is fun.</h2>
<p>The red kite</p> -
19.📋 What number does the browser show next to “Mango”?
<ol>
<li>Guava</li>
<li>Mango</li>
<li>Banana</li>
</ol> - 20.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h6> or <h2>? (a) <h3> (b) <h2> (c) <h5> (d) <h6>
-
21.🔗 Where does this link open?
<a href="contact.html">Maths fun</a> (a) in a new tab (b) in the same tab - 22.🏷️ Which is the closing tag for <u>? (a) <u/> (b) <\u> (c) </u> (d) <u>
-
23.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>I like to read.</p>
</body>
</html> (a) Easy snacks (b) index.html (c) My Hobbies (d) I like to read. - 24.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
- 25.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 26.🔗 What does target="_blank" do to a link? (a) makes it bold (b) hides the link (c) makes it blank (d) opens it in a new tab
-
27.🔍 Which line is missing its closing tag?
line 1: <h3>Fun facts
line 2: <strong>Cricket is fun.</strong>
line 3: <u>Our school trip</u> (a) line 2 (b) line 1 (c) line 3 -
28.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="300"> (a) Our school bus (b) tiger.jpg (c) fort.jpg (d) bus.jpg -
29.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Rain today</p>
<p>Hello, world!</p>
<p>My pets</p>
<!-- <p>Good morning!</p> --> - 30.True or false: a code editor shows line numbers. (a) False (b) True
- 31.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h4> or <h3>? (a) <h3> (b) <h5> (c) <h4> (d) <h2>
- 32.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
33.🔗 Which words do you click on?
<a href="art.html">Visit the site</a> (a) art.html (b) Visit the site (c) href (d) Maths fun - 34.Which of these goes in the body? (a) <title> (b) <style> (c) <meta charset="utf-8"> (d) <p>
- 35.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) src (d) alt
- 36.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h4>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
-
37.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Litchi</li>
</ol> (a) numbers (b) bullets - 38.Which of these is true of a web browser? (a) answers page requests (b) sends pages over the net (c) shows pages from the web (d) is where we type code
-
39.🔍 One closing tag is missing. Which one?
<h1>Good morning!
<h3>Cricket is fun.</h3>
<i>The red kite</i> (a) </i> (b) </small> (c) </h3> (d) </h1> -
40.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Banana</li>
</ul> (a) bullets (b) numbers
Answer key
- 2
- True
- a web server
- <img>
- A happy dog
- <a>
- alt
- </h2>
- a closing tag
- a web browser
- 1
- on the browser tab
- 3
- False
- 1
- </p>
- 3
- 3
- 2
- <h2>
- in the same tab
- </u>
- My Hobbies
- a code editor
- an empty tag
- opens it in a new tab
- line 1
- bus.jpg
- 4
- True
- <h2>
- Yes
- Visit the site
- <p>
- alt
- <h4>
- numbers
- shows pages from the web
- </h1>
- bullets
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids