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 one answers page requests? (a) a web server (b) a web browser (c) a code editor
-
2.🔍 Which line is missing its closing tag?
line 1: <h1>My pets
line 2: <p>Rain today</p>
line 3: <b>Our school trip</b> (a) line 1 (b) line 3 (c) line 2 - 3.🌐 Which one opens web pages for us? (a) a web server (b) a web browser (c) a code editor
-
4.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Mango</li>
</ol> - 5.🔍 Which is the odd one out? (a) answers page requests (b) hosts websites online (c) colours code to help us (d) sends pages over the net
- 6.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 7.📝 What does <p> make? (a) a link (b) a table (c) a picture (d) a paragraph
- 8.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 9.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <!DOCTYPE html> (d) <body>
-
10.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="350"> - 11.🔗 Which attribute holds the address of a link? (a) id (b) href (c) src (d) alt
- 12.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) opens web pages for us (d) saves our .html files
-
13.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Fun facts</p> -->
<p>Rain today</p> (a) Fun facts (b) Hello, world! (c) Rain today -
14.🔗 Where does this link open?
<a href="about.html" target="_blank">Maths fun</a> (a) in a new tab (b) in the same tab - 15.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 16.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 17.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 18.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 19.Which of these is an opening tag? (a) </title> (b) </b> (c) <h1> (d) </p>
-
20.🔍 Which line is missing its closing tag?
line 1: <b>Hello, world!
line 2: <h1>Our school trip</h1>
line 3: <h3>I love mangoes.</h3> (a) line 2 (b) line 1 (c) line 3 -
21.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Litchi</li>
<li>Jamun</li>
<li>Papaya</li>
</ul> -
22.💬 Which text will NOT show on the page?
<p>My pets</p>
<!-- <p>Cricket is fun.</p> -->
<p>I love mangoes.</p> (a) I love mangoes. (b) My pets (c) Cricket is fun. -
23.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p>
<p>Fun facts</p> (a) Fun facts (b) Hello, world! (c) I love mangoes. - 24.True or false: <li> is an empty tag. (a) False (b) True
- 25.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
-
26.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<p>Cricket is fun.</p>
<p>Good morning!</p>
<!-- <p>Fun facts</p> --> - 27.🌐 Which one colours code to help us? (a) a web server (b) a code editor (c) a web browser
- 28.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
- 29.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <p> (d) <h6>
- 30.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to show pictures (d) to add colour
- 31.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
- 32.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h2> or <h3>? (a) <h2> (b) <h1> (c) <h3> (d) <h4>
- 33.Which of these has a closing tag? (a) <meta> (b) <br> (c) <img> (d) <h1>
- 34.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) <html> (b) </html>
- 35.Which of these is an opening tag? (a) </b> (b) </p> (c) <body> (d) </h1>
- 36.📄 Can HTML on its own keep a high score? (a) No (b) Yes
- 37.True or false: HTML on its own can count button clicks. (a) False (b) True
-
38.🔗 Which address opens when you click this link?
<a href="contact.html">Play games</a> (a) https://example.com (b) contact.html (c) Play games (d) maths.html - 39.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
- 40.Which of these is true of a web browser? (a) colours code to help us (b) sends pages over the net (c) has an address bar (d) hosts websites online
Answer key
- a web server
- line 1
- a web browser
- 2
- colours code to help us
- an opening tag
- a paragraph
- has a closing tag
- <!DOCTYPE html>
- 350
- href
- saves our .html files
- Fun facts
- in a new tab
- in the body
- in the head
- No
- in the head
- <h1>
- line 1
- 4
- Cricket is fun.
- I love mangoes.
- False
- <a>
- 3
- a code editor
- a web browser
- <h6>
- to leave notes
- -->
- <h4>
- <h1>
- <html>
- <body>
- No
- False
- contact.html
- opens it in a new tab
- has an address bar
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids