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 address opens when you click this link?
<a href="quiz.html">Play games</a> (a) about.html (b) games.html (c) quiz.html (d) Play games -
2.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Roses are red</p> - 3.Which of these is an opening tag? (a) </b> (b) <h1> (c) </body> (d) </p>
- 4.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 5.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
6.📝 How many paragraphs does this code make?
<p>Rain today</p>
<p>Cricket is fun.</p>
<p>The red kite</p> - 7.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) saves our .html files (d) hosts websites online
-
8.🔗 Which words do you click on?
<a href="news.html">Visit the site</a> (a) Maths fun (b) news.html (c) Visit the site (d) href - 9.True or false: <title> goes in the body. (a) False (b) True
-
10.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) tiger.jpg (b) width (c) A red kite (d) A tiger asleep - 11.True or false: <ul> is an unordered list. (a) False (b) True
- 12.🔗 Which tag makes a clickable link? (a) <link> (b) <a> (c) <p> (d) <img>
- 13.📋 Which tag goes around each item of a list? (a) <p> (b) <ol> (c) <li> (d) <ul>
-
14.📄 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>Mars is red.</p>
</body>
</html> (a) All about me (b) Mars is red. (c) Class 7 Blog (d) body - 15.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) at the bottom (d) in a big heading
-
16.🔗 Where does this link open?
<a href="about.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab -
17.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>I love mangoes.</p>
<h2>Good morning!</h2> - 18.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 19.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
- 20.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
21.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Good morning!</p>
<p>The red kite</p>
<p>Fun facts</p> - 22.📄 Can HTML on its own make tables? (a) Yes (b) No
- 23.Which of these goes in the head? (a) <style> (b) <table> (c) <ul> (d) <img>
-
24.🔠 How many headings are in this code?
<h1>My pets</h1>
<h2>My pets</h2>
<h2>Rain today</h2> - 25.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
26.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>My best friend</p>
<!-- <p>Good morning!</p> --> - 27.🔗 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
-
28.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Our school trip</p>
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> --> (a) Hello, world! (b) Fun facts (c) Our school trip (d) I love mangoes. -
29.🔗 Which words do you click on?
<a href="art.html">About us</a> (a) About us (b) art.html (c) href (d) Contact us -
30.🔗 Where does this link open?
<a href="news.html">Visit the site</a> (a) in the same tab (b) in a new tab - 31.True or false: <b> has a closing tag. (a) False (b) True
- 32.True or false: <hr> is an empty tag. (a) True (b) False
-
33.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p>
<p>Cricket is fun.</p>
<p>The red kite</p> (a) The red kite (b) Hello, world! (c) Cricket is fun. (d) Fun facts - 34.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 35.True or false: <p> is an empty tag. (a) False (b) True
- 36.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h1> or <h4>? (a) <h1> (b) <h6> (c) <h3> (d) <h4>
-
37.🔗 Which words do you click on?
<a href="https://example.com">Visit the site</a> (a) Visit the site (b) https://example.com (c) href (d) Maths fun -
38.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> -->
<p>Rain today</p> -
39.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p>
<p>Good morning!</p> (a) Cricket is fun. (b) I love mangoes. (c) Good morning! - 40.🔍 Which is the odd one out? (a) colours code to help us (b) sends pages over the net (c) is where we type code (d) saves our .html files
Answer key
- quiz.html
- 2
- <h1>
- No
- has a closing tag
- 3
- saves our .html files
- Visit the site
- False
- A tiger asleep
- True
- <a>
- <li>
- All about me
- on the browser tab
- in a new tab
- 2
- No
- <ul>
- a closing tag
- 3
- Yes
- <style>
- 3
- an opening tag
- 1
- opens it in a new tab
- Hello, world!
- About us
- in the same tab
- True
- True
- Hello, world!
- an empty tag
- False
- <h6>
- Visit the site
- 2
- I love mangoes.
- sends pages over the net
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids