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.🔗 Where does this link open?
<a href="https://example.com">Art corner</a> (a) in a new tab (b) in the same tab -
2.🔗 Which address opens when you click this link?
<a href="https://example.com">About us</a> (a) maths.html (b) About us (c) art.html (d) https://example.com - 3.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
- 4.🔍 Which is the odd one out? (a) turns HTML into a page (b) opens web pages for us (c) answers page requests (d) has an address bar
- 5.🏷️ Which is the closing tag for <small>? (a) <small> (b) <\small> (c) </small> (d) <small/>
- 6.🔍 Which is the odd one out? (a) saves our .html files (b) is where we type code (c) has an address bar (d) shows line numbers
- 7.True or false: <p> goes in the head. (a) True (b) False
-
8.🔍 One closing tag is missing. Which one?
<p>My pets</p>
<h3>I love mangoes.</h3>
<b>Hello, world! (a) </h3> (b) </b> (c) </i> (d) </p> - 9.True or false: in <img>, src tells which image to load. (a) True (b) False
-
10.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) href (b) Play games (c) maths.html (d) Take the quiz - 11.🔍 Which is the odd one out? (a) is where we type code (b) shows line numbers (c) saves our .html files (d) hosts websites online
- 12.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to add colour (d) to make links
- 13.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
- 14.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h6> or <h1>? (a) <h1> (b) <h6> (c) <h2> (d) <h4>
-
15.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>I love mangoes.</p>
<p>Good morning!</p>
<h3>Fun facts</h3>
<p>Rain today</p> - 16.True or false: <h1> is an empty tag. (a) True (b) False
- 17.True or false: a web browser shows pages from the web. (a) True (b) False
- 18.🏷️ Which is the closing tag for <u>? (a) <u> (b) <u/> (c) </u> (d) <\u>
- 19.🔍 Which is the odd one out? (a) turns HTML into a page (b) stores a website’s files (c) sends pages over the net (d) hosts websites online
- 20.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
-
21.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p> (a) Our school trip (b) The red kite (c) Cricket is fun. - 22.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
23.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>Good morning!</p> -->
<!-- <p>Our school trip</p> -->
<p>My best friend</p> -
24.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) All about me (b) Here is my best one. (c) My Hobbies (d) index.html - 25.True or false: in <img>, width is read by screen readers. (a) False (b) True
- 26.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h1>? (a) <h3> (b) <h6> (c) <h4> (d) <h1>
- 27.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <p> (d) <ul>
- 28.🏷️ Which is the closing tag for <h3>? (a) </h3> (b) <h3/> (c) <\h3> (d) <h3>
-
29.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>Rain today</p>
<p>Cricket is fun.</p>
<p>My best friend</p>
<h2>Cricket is fun.</h2>
<p>Hello, world!</p> -
30.🔗 Which words do you click on?
<a href="games.html">School news</a> (a) href (b) Take the quiz (c) games.html (d) School news -
31.🔍 One closing tag is missing. Which one?
<em>Cricket is fun.</em>
<small>Hello, world!</small>
<u>Fun facts (a) </small> (b) </h1> (c) </em> (d) </u> - 32.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) Hot Tags (c) Home Text (d) High Tech
-
33.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>Our school trip</p> -->
<p>Fun facts</p>
<p>Good morning!</p> (a) Rain today (b) Good morning! (c) Our school trip (d) Fun facts - 34.🔤 In “HTML”, what does the M stand for? (a) Markup (b) Modern (c) Machine (d) Mouse
- 35.Which of these is an empty tag? (a) <img> (b) <b> (c) <p> (d) <h1>
- 36.💬 Does the browser show comments on the page? (a) Yes (b) No
- 37.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h5> or <h3>? (a) <h3> (b) <h6> (c) <h5> (d) <h1>
- 38.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) width (c) height (d) alt
-
39.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="250"> (a) Map of India (b) width (c) kite.png (d) A red kite - 40.Which of these is an opening tag? (a) </p> (b) </body> (c) <b> (d) </h1>
Answer key
- in the same tab
- https://example.com
- True
- answers page requests
- </small>
- has an address bar
- False
- </b>
- True
- Take the quiz
- hosts websites online
- to leave notes
- False
- <h6>
- 2
- False
- True
- </u>
- turns HTML into a page
- <!DOCTYPE html>
- Cricket is fun.
- an empty tag
- 1
- My Hobbies
- False
- <h6>
- <li>
- </h3>
- 5
- School news
- </u>
- HyperText
- Our school trip
- Markup
- <img>
- No
- <h1>
- height
- A red kite
- <b>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids