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.🔢 In a basic web page file, which comes first: “<head>” or “</body>”? (a) </body> (b) <head>
- 2.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
- 3.True or false: <h1> has a closing tag. (a) True (b) False
- 4.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a dollar $ (c) a hash # (d) a slash /
-
5.🔍 One closing tag is missing. Which one?
<h3>The red kite</h3>
<h2>I love mangoes.
<h1>Fun facts</h1> (a) </strong> (b) </h1> (c) </h3> (d) </h2> - 6.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) HyperText (c) Home Text (d) Hot Tags
-
7.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) body (b) Class 7 Blog (c) Welcome! (d) Thanks for visiting. - 8.True or false: <li> lists steps in order. (a) False (b) True
-
9.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Our school trip</p> -->
<p>Fun facts</p> (a) Our school trip (b) Fun facts (c) The red kite - 10.🔢 In a basic web page file, which comes LAST? (a) </body> (b) <body> (c) <!DOCTYPE html> (d) </html>
- 11.📝 What do we need to write HTML? (a) a paintbrush (b) a plain text editor (c) a microphone (d) a printer
- 12.Which of these is true of a web server? (a) colours code to help us (b) has an address bar (c) sends pages over the net (d) opens web pages for us
- 13.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
- 14.True or false: HTML on its own can run a game loop. (a) True (b) False
- 15.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
- 16.🔢 In a basic web page file, which comes first: “</html>” or “</head>”? (a) </html> (b) </head>
- 17.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <a href="about.html"> (d) <link about.html>
- 18.True or false: in <img>, src describes the picture. (a) True (b) False
- 19.True or false: in <img>, src tells which image to load. (a) False (b) True
- 20.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <br> (d) <hr>
-
21.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>My drawings</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Riya’s Recipes (b) index.html (c) Here is my best one. (d) My drawings - 22.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
-
23.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<p>Hello, world!</p> (a) Good morning! (b) Cricket is fun. (c) Hello, world! (d) I love mangoes. -
24.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Stars shine<br>Birds sing<br>Sky is blue</p> -
25.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>My pets</p>
<!-- <p>Good morning!</p> -->
<p>Rain today</p>
<!-- <p>The red kite</p> --> -
26.🔗 Which address opens when you click this link?
<a href="maths.html">Maths fun</a> (a) news.html (b) art.html (c) Maths fun (d) maths.html - 27.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 28.True or false: <style> goes in the body. (a) True (b) False
- 29.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
- 30.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <h6> (d) <p>
-
31.🔗 Which words do you click on?
<a href="games.html">Maths fun</a> (a) Art corner (b) Maths fun (c) games.html (d) href -
32.🔍 One closing tag is missing. Which one?
<b>The red kite</b>
<i>Our school trip
<u>I love mangoes.</u> (a) </h2> (b) </b> (c) </i> (d) </u> - 33.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 34.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
- 35.🌐 Which one colours code to help us? (a) a web browser (b) a code editor (c) a web server
-
36.🔗 Which words do you click on?
<a href="games.html">Art corner</a> (a) Art corner (b) href (c) School news (d) games.html - 37.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <head> (d) <!DOCTYPE html>
- 38.Which of these goes in the head? (a) <img> (b) <a> (c) <link rel="stylesheet"> (d) <h1>
-
39.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Grapes</li>
<li>Jamun</li>
<li>Orange</li>
</ol> - 40.📋 Which list tag shows bullet points? (a) <li> (b) <ol> (c) <ul>
Answer key
- <head>
- a code editor
- True
- a slash /
- </h2>
- HyperText
- Welcome!
- False
- Our school trip
- </html>
- a plain text editor
- sends pages over the net
- on the browser tab
- False
- to leave notes
- </head>
- <a href="about.html">
- False
- True
- <ul>
- Riya’s Recipes
- in the body
- Good morning!
- 4
- 2
- maths.html
- a closing tag
- False
- Yes
- <h1>
- Maths fun
- </i>
- Yes
- <ol>
- a code editor
- Art corner
- <!DOCTYPE html>
- <link rel="stylesheet">
- 2
- <ul>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids