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 of these goes in the head? (a) <h1> (b) <ul> (c) <link rel="stylesheet"> (d) <img>
- 2.Which of these is a closing tag? (a) <body> (b) <b> (c) <p> (d) </li>
- 3.Which of these goes in the head? (a) <h1> (b) <style> (c) <p> (d) <ul>
- 4.True or false: <p> is an empty tag. (a) True (b) False
-
5.🔍 Which line is missing its closing tag?
line 1: <h1>Good morning!</h1>
line 2: <b>I love mangoes.</b>
line 3: <strong>Cricket is fun. (a) line 3 (b) line 1 (c) line 2 -
6.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>Good morning!</h2>
<h3>Fun facts</h3> - 7.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h6>? (a) <h6> (b) <h3> (c) <h1> (d) <h5>
- 8.Which of these goes in the head? (a) <h1> (b) <table> (c) <meta charset="utf-8"> (d) <p>
-
9.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="250"> (a) bus.jpg (b) moon.png (c) fort.jpg (d) The full moon - 10.True or false: <ul> shows bullet points. (a) False (b) True
-
11.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) My Hobbies (b) Welcome! (c) Mars is red. (d) body -
12.🔍 Which line is missing its closing tag?
line 1: <h2>The red kite
line 2: <p>Our school trip</p>
line 3: <h3>My best friend</h3> (a) line 1 (b) line 2 (c) line 3 - 13.📋 Which list suits a shopping list in any order? (a) <hr> (b) <br> (c) <ul> (d) <ol>
- 14.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
-
15.🔗 Which address opens when you click this link?
<a href="maths.html">Contact us</a> (a) maths.html (b) news.html (c) Contact us (d) art.html -
16.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p>
<!-- <p>Fun facts</p> --> - 17.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 18.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h1> (d) <h6>
- 19.Which of these is an opening tag? (a) </b> (b) </body> (c) </title> (d) <p>
-
20.📋 What number does the browser show next to “Mango”?
<ol>
<li>Jamun</li>
<li>Mango</li>
<li>Litchi</li>
<li>Orange</li>
<li>Papaya</li>
</ol> -
21.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Class 7 Blog (b) All about me (c) Thanks for visiting. (d) body -
22.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Fun facts</h2>
<p>I love mangoes.</p>
<p>Hello, world!</p>
<h2>Cricket is fun.</h2>
<h2>Cricket is fun.</h2> - 23.🖼️ Which attribute of <img> describes the picture? (a) src (b) height (c) alt (d) width
-
24.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) Contact us (b) https://example.com (c) href (d) About us - 25.🔍 Which is the odd one out? (a) sends pages over the net (b) has an address bar (c) stores a website’s files (d) answers page requests
- 26.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 27.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h1> (d) <h3>
-
28.🔗 Where does this link open?
<a href="games.html">Maths fun</a> (a) in the same tab (b) in a new tab - 29.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) makes it blank (d) hides the link
- 30.True or false: HTML on its own can make bullet lists. (a) True (b) False
- 31.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h2> or <h5>? (a) <h3> (b) <h5> (c) <h6> (d) <h2>
-
32.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>Fun facts</p>
<p>My best friend</p>
<h2>I love mangoes.</h2> - 33.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
-
34.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Papaya</li>
<li>Orange</li>
</ul> (a) numbers (b) bullets - 35.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h6>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
-
36.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow</p> -
37.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Our school trip</p>
<!-- <p>Rain today</p> -->
<p>Hello, world!</p> - 38.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h1> or <h2>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
- 39.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 40.🔍 Which is the odd one out? (a) answers page requests (b) sends pages over the net (c) hosts websites online (d) opens web pages for us
Answer key
- <link rel="stylesheet">
- </li>
- <style>
- False
- line 3
- 3
- <h6>
- <meta charset="utf-8">
- moon.png
- True
- Welcome!
- line 1
- <ul>
- <h1>
- maths.html
- 1
- Yes
- <h1>
- <p>
- 2
- All about me
- 3
- alt
- About us
- has an address bar
- Yes
- <h6>
- in the same tab
- opens it in a new tab
- True
- <h2>
- 3
- <a href="about.html">
- bullets
- <h1>
- 2
- 2
- <h1>
- a closing tag
- opens web pages for us
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids