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.📝 Does <hr> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 2.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 3.True or false: a web server opens web pages for us. (a) False (b) True
- 4.🖼️ Which attribute of <img> names the picture file? (a) src (b) height (c) alt (d) width
-
5.🔍 Which line is missing its closing tag?
line 1: <em>Cricket is fun.</em>
line 2: <small>Rain today
line 3: <i>My best friend</i> (a) line 1 (b) line 3 (c) line 2 - 6.🔠 Which heading shows the BIGGEST text: <h1>, <h4>, <h6> or <h3>? (a) <h1> (b) <h6> (c) <h4> (d) <h3>
-
7.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>My best friend</p>
<p>Our school trip</p>
<p>Hello, world!</p>
<p>My best friend</p> - 8.True or false: <img> goes in the body. (a) False (b) True
- 9.📝 What does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
- 10.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
11.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Papaya</li>
<li>Jamun</li>
<li>Guava</li>
</ol> - 12.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a src="about.html">
- 13.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a hash # (c) a dollar $ (d) a slash /
- 14.True or false: <ol> goes inside ul or ol. (a) False (b) True
-
15.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Banana</li>
</ol> (a) numbers (b) bullets - 16.💬 How does an HTML comment start? (a) /* (b) // (c) <!-- (d) #
- 17.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
18.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Our school trip</p>
<p>My best friend</p>
<h2>My best friend</h2>
<h2>My pets</h2>
<p>Rain today</p> - 19.Which of these goes in the head? (a) <style> (b) <p> (c) <table> (d) <img>
- 20.True or false: <table> goes in the head. (a) True (b) False
- 21.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
- 22.Which of these is a closing tag? (a) <body> (b) </h1> (c) <b> (d) <title>
- 23.🌐 Which one answers page requests? (a) a web server (b) a web browser (c) a code editor
-
24.🔍 One closing tag is missing. Which one?
<p>I love mangoes.
<h1>My pets</h1>
<b>Hello, world!</b> (a) </p> (b) </b> (c) </h1> (d) </u> -
25.🔗 Which words do you click on?
<a href="games.html">Play games</a> (a) games.html (b) About us (c) Play games (d) href -
26.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) Match report (b) index.html (c) I like to read. (d) Art Gallery - 27.True or false: a web server hosts websites online. (a) False (b) True
-
28.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Banana</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Orange</li>
</ul> -
29.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>My pets</p>
<h2>Cricket is fun.</h2>
<h2>Rain today</h2>
<p>I love mangoes.</p> - 30.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <p> (d) <h1>
-
31.🔗 Where does this link open?
<a href="games.html">Play games</a> (a) in a new tab (b) in the same tab - 32.📋 Which list tag lists things in any order? (a) <li> (b) <ol> (c) <ul>
- 33.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
- 34.🏷️ Which is the closing tag for <p>? (a) <p/> (b) <\p> (c) </p> (d) <p>
- 35.Which of these has a closing tag? (a) <img> (b) <meta> (c) <title> (d) <input>
-
36.💬 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> --> - 37.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h1>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
- 38.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
-
39.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h3>I love mangoes.</h3>
<p>Hello, world!</p>
<p>The red kite</p>
<p>I love mangoes.</p> - 40.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <\h2> (d) <h2>
Answer key
- an empty tag
- a closing tag
- False
- src
- line 2
- <h1>
- 5
- True
- a line across the page
- has a closing tag
- 2
- <a href="about.html">
- a slash /
- False
- numbers
- <!--
- a closing tag
- 4
- <style>
- False
- the body
- </h1>
- a web server
- </p>
- Play games
- Art Gallery
- True
- 5
- 3
- <h6>
- in the same tab
- <ul>
- False
- </p>
- <title>
- 1
- <h1>
- a web browser
- 2
- </h2>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids