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.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 2.Which of these is a closing tag? (a) </title> (b) <li> (c) <title> (d) <p>
-
3.🔗 Which address opens when you click this link?
<a href="games.html">Play games</a> (a) contact.html (b) Play games (c) games.html (d) about.html - 4.Which of these is a closing tag? (a) <li> (b) </li> (c) <b> (d) <body>
-
5.🔍 Which line is missing its closing tag?
line 1: <h3>Rain today
line 2: <p>I love mangoes.</p>
line 3: <h1>Cricket is fun.</h1> (a) line 1 (b) line 3 (c) line 2 - 6.True or false: HTML on its own cannot make links to pages. (a) False (b) True
-
7.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>Rain today</p>
<!-- <p>The red kite</p> -->
<p>Fun facts</p> -
8.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> -->
<p>My pets</p>
<p>Good morning!</p> (a) I love mangoes. (b) Cricket is fun. (c) Good morning! (d) My pets -
9.🔍 One closing tag is missing. Which one?
<h2>My best friend</h2>
<strong>Cricket is fun.
<em>The red kite</em> (a) </h2> (b) </strong> (c) </em> (d) </u> - 10.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <link rel="stylesheet"> (c) <h1> (d) <title>
- 11.True or false: a web server shows pages from the web. (a) False (b) True
- 12.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <h1> (d) <p>
- 13.🔗 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">
- 14.True or false: <ul> shows bullet points. (a) True (b) False
- 15.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 16.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
- 17.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a dot . (c) a slash / (d) a dollar $
- 18.Which of these is a closing tag? (a) <p> (b) </h1> (c) <li> (d) <title>
- 19.Which of these is an empty tag? (a) <b> (b) <meta> (c) <li> (d) <h1>
-
20.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>Cricket is fun.</p>
<p>My best friend</p>
<!-- <p>I love mangoes.</p> --> (a) Cricket is fun. (b) Our school trip (c) I love mangoes. (d) My best friend - 21.🌐 Which one opens web pages for us? (a) a code editor (b) a web browser (c) a web server
- 22.True or false: HTML on its own can pick a random number. (a) True (b) False
-
23.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) body (b) Cricket Club (c) Thanks for visiting. (d) All about me -
24.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Rain today</p>
<p>Fun facts</p> (a) My best friend (b) Rain today (c) Fun facts -
25.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="200"> (a) map.png (b) width (c) Birthday cake (d) Map of India -
26.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) All about me (b) I like to read. (c) My Hobbies (d) body - 27.🔠 Which tag is the least important heading? (a) <p> (b) <h3> (c) <h6> (d) <h1>
-
28.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Sky is blue<br>Birds sing<br>Kites fly high</p> - 29.True or false: HTML on its own can count button clicks. (a) True (b) False
- 30.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h3> or <h5>? (a) <h5> (b) <h6> (c) <h2> (d) <h3>
-
31.🔍 One closing tag is missing. Which one?
<i>My pets
<p>My best friend</p>
<h1>I love mangoes.</h1> (a) </i> (b) </small> (c) </h1> (d) </p> - 32.📝 What does <br> do? (a) makes text bold (b) makes a list (c) adds a picture (d) starts a new line
-
33.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="50"> -
34.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Papaya</li>
<li>Litchi</li>
</ul> (a) bullets (b) numbers - 35.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) <h1> (c) </h1> (d) <\h1>
-
36.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Our school trip</p>
<!-- <p>My best friend</p> -->
<!-- <p>The red kite</p> --> - 37.True or false: <ol> is an unordered list. (a) True (b) False
-
38.🔍 One closing tag is missing. Which one?
<p>I love mangoes.</p>
<h2>My pets</h2>
<h3>Good morning! (a) </p> (b) </em> (c) </h3> (d) </h2> - 39.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) <html>
-
40.🔗 Where does this link open?
<a href="art.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab
Answer key
- a closing tag
- </title>
- games.html
- </li>
- line 1
- False
- 3
- I love mangoes.
- </strong>
- <h1>
- False
- <h1>
- <a href="about.html">
- True
- Yes
- <ul>
- a slash /
- </h1>
- <meta>
- I love mangoes.
- a web browser
- False
- All about me
- My best friend
- Map of India
- All about me
- <h6>
- 4
- False
- <h2>
- </i>
- starts a new line
- 50
- bullets
- </h1>
- 2
- False
- </h3>
- <!DOCTYPE html>
- in a new tab
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids