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 code links to about.html? (a) <link about.html> (b) <a href="about.html"> (c) <a src="about.html"> (d) <a alt="about.html">
- 2.Which of these is true of a web server? (a) saves our .html files (b) has an address bar (c) answers page requests (d) colours code to help us
- 3.Which of these is an empty tag? (a) <b> (b) <title> (c) <meta> (d) <p>
- 4.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <h1/> (c) <\h1> (d) </h1>
-
5.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Jamun</li>
</ol> - 6.True or false: in <img>, width tells which image to load. (a) True (b) False
- 7.True or false: in <img>, height sets how tall it is. (a) False (b) True
-
8.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>I love mangoes.</h2>
<h2>I love mangoes.</h2>
<p>Fun facts</p>
<p>Our school trip</p> - 9.True or false: <p> is an empty tag. (a) False (b) True
- 10.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 6 (c) 10 (d) 1
- 11.Which of these has a closing tag? (a) <input> (b) <img> (c) <title> (d) <br>
- 12.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
-
13.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Banana</li>
<li>Litchi</li>
</ul> (a) bullets (b) numbers -
14.🔍 Which line is missing its closing tag?
line 1: <strong>Rain today</strong>
line 2: <p>Cricket is fun.
line 3: <h1>Hello, world!</h1> (a) line 2 (b) line 1 (c) line 3 -
15.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) index.html (b) My Hobbies (c) I like to read. (d) Planets -
16.🔗 Which address opens when you click this link?
<a href="https://example.com">About us</a> (a) art.html (b) https://example.com (c) maths.html (d) About us - 17.Which of these is an opening tag? (a) </p> (b) </li> (c) <li> (d) </h1>
- 18.True or false: HTML on its own can add up two numbers. (a) True (b) False
- 19.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
20.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>My pets</p>
<!-- <p>Good morning!</p> --> (a) My best friend (b) My pets (c) Good morning! - 21.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <meta charset="utf-8"> (d) <img>
- 22.Which of these is an opening tag? (a) </title> (b) </b> (c) </p> (d) <h1>
-
23.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>I like to read.</p>
</body>
</html> (a) Art Gallery (b) I like to read. (c) All about me (d) index.html -
24.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> --> (a) I love mangoes. (b) Good morning! (c) Hello, world! - 25.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
-
26.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Fun facts</p>
<p>Fun facts</p> -
27.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>My pets</p>
<p>The red kite</p>
<!-- <p>I love mangoes.</p> --> (a) The red kite (b) My pets (c) Our school trip (d) I love mangoes. - 28.🏷️ Which is the closing tag for <p>? (a) <\p> (b) <p> (c) </p> (d) <p/>
- 29.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 30.True or false: in <img>, src describes the picture. (a) True (b) False
- 31.🔤 In “HTML”, what do the letters HT stand for? (a) Hot Tags (b) High Tech (c) Home Text (d) HyperText
- 32.True or false: <li> lists things in any order. (a) True (b) False
- 33.📄 Can HTML on its own make links to pages? (a) Yes (b) No
- 34.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h4> or <h1>? (a) <h2> (b) <h4> (c) <h1> (d) <h5>
-
35.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Banana</li>
<li>Mango</li>
<li>Guava</li>
</ol> - 36.Which of these goes in the head? (a) <img> (b) <a> (c) <ul> (d) <title>
-
37.🔗 Which address opens when you click this link?
<a href="contact.html">School news</a> (a) contact.html (b) https://example.com (c) maths.html (d) School news - 38.Which of these goes in the head? (a) <h1> (b) <img> (c) <p> (d) <meta charset="utf-8">
-
39.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Rain today</p>
<!-- <p>Hello, world!</p> --> - 40.🏷️ HTML marks up text using ___. (a) pixels (b) keys (c) tags (d) wires
Answer key
- <a href="about.html">
- answers page requests
- <meta>
- </h1>
- 2
- False
- True
- 3
- False
- 1
- <title>
- opens it in a new tab
- bullets
- line 2
- My Hobbies
- https://example.com
- <li>
- False
- Yes
- Good morning!
- <img>
- <h1>
- Art Gallery
- Good morning!
- on the browser tab
- 1
- I love mangoes.
- </p>
- a closing tag
- False
- HyperText
- False
- Yes
- <h1>
- 4
- <title>
- contact.html
- <meta charset="utf-8">
- 1
- tags
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids