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 of these is true of a web server? (a) opens web pages for us (b) shows pages from the web (c) shows line numbers (d) hosts websites online
- 2.🖼️ Which tag puts a picture on a page? (a) <a> (b) <pic> (c) <p> (d) <img>
- 3.True or false: <style> goes in the head. (a) False (b) True
- 4.📄 Where does the text of <title> appear? (a) on the browser tab (b) at the bottom (c) nowhere (d) in a big heading
- 5.🔍 Which is the odd one out? (a) stores a website’s files (b) opens web pages for us (c) has an address bar (d) turns HTML into a page
-
6.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Jamun</li>
<li>Grapes</li>
</ol> (a) numbers (b) bullets -
7.🔗 Which address opens when you click this link?
<a href="about.html">School news</a> (a) contact.html (b) School news (c) https://example.com (d) about.html -
8.🔗 Which address opens when you click this link?
<a href="contact.html">School news</a> (a) maths.html (b) School news (c) https://example.com (d) contact.html -
9.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>The red kite</p>
<p>Rain today</p> - 10.Which of these is a closing tag? (a) <h1> (b) </b> (c) <p> (d) <li>
- 11.Which of these is an opening tag? (a) </p> (b) </b> (c) </h1> (d) <li>
- 12.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
13.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>Our school trip</h2>
<h2>Good morning!</h2> -
14.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>Our school trip</p>
<p>Our school trip</p>
<p>Hello, world!</p> -
15.🔗 Where does this link open?
<a href="about.html">About us</a> (a) in a new tab (b) in the same tab - 16.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to add colour (d) to show pictures
- 17.True or false: HTML on its own can show paragraphs. (a) False (b) True
- 18.True or false: <ul> goes in the head. (a) True (b) False
- 19.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 20.True or false: in <img>, src is read by screen readers. (a) False (b) True
- 21.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 22.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h5> or <h1>? (a) <h3> (b) <h1> (c) <h4> (d) <h5>
- 23.True or false: <p> is an empty tag. (a) False (b) True
- 24.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <br> (d) <ol>
-
25.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="350"> -
26.🔍 One closing tag is missing. Which one?
<small>Our school trip
<u>The red kite</u>
<i>Fun facts</i> (a) </u> (b) </small> (c) </i> (d) </em> - 27.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 28.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as one space (c) as a new line (d) as a dot
- 29.💬 Does the browser show comments on the page? (a) Yes (b) No
- 30.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
- 31.🏷️ Which is the closing tag for <em>? (a) <em> (b) <\em> (c) <em/> (d) </em>
- 32.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 3 (c) 10 (d) 1
- 33.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
-
34.🔗 Which words do you click on?
<a href="about.html">Contact us</a> (a) href (b) Contact us (c) about.html (d) Visit the site - 35.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) alt (c) width (d) height
-
36.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>The red kite</p>
<h4>My pets</h4>
<h3>Good morning!</h3> - 37.True or false: a web server opens web pages for us. (a) False (b) True
-
38.🔗 Which address opens when you click this link?
<a href="https://example.com">Maths fun</a> (a) maths.html (b) Maths fun (c) art.html (d) https://example.com - 39.Which of these is a closing tag? (a) <li> (b) <p> (c) </h1> (d) <b>
- 40.🏷️ HTML marks up text using ___. (a) pixels (b) keys (c) wires (d) tags
Answer key
- hosts websites online
- <img>
- True
- on the browser tab
- stores a website’s files
- numbers
- about.html
- contact.html
- 1
- </b>
- <li>
- an opening tag
- 1
- 1
- in the same tab
- to leave notes
- True
- False
- an opening tag
- False
- an empty tag
- <h5>
- False
- <ul>
- 350
- </small>
- in the body
- as one space
- No
- in the head
- </em>
- 1
- opens it in a new tab
- Contact us
- alt
- 3
- False
- https://example.com
- </h1>
- tags
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids