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 list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
- 2.🔍 Which is the odd one out? (a) colours code to help us (b) turns HTML into a page (c) opens web pages for us (d) shows pages from the web
- 3.🔗 Which tag makes a clickable link? (a) <p> (b) <a> (c) <img> (d) <link>
-
4.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>The red kite</p>
<p>I love mangoes.</p>
<p>Our school trip</p> (a) Our school trip (b) My pets (c) The red kite (d) I love mangoes. -
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> (a) A tiger asleep (b) width (c) A red kite (d) tiger.jpg -
6.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="50"> -
7.🔍 One closing tag is missing. Which one?
<h1>My pets</h1>
<b>Hello, world!
<strong>Good morning!</strong> (a) </b> (b) </strong> (c) </small> (d) </h1> - 8.🌐 Which one opens web pages for us? (a) a code editor (b) a web browser (c) a web server
-
9.🔍 One closing tag is missing. Which one?
<u>My best friend</u>
<strong>Good morning!</strong>
<h3>Fun facts (a) </strong> (b) </u> (c) </h3> (d) </p> - 10.📄 Where does <a> go: in the head or in the body? (a) in the body (b) in the head
- 11.Which of these goes in the head? (a) <p> (b) <title> (c) <img> (d) <h1>
- 12.Which of these is a closing tag? (a) <b> (b) <h1> (c) </title> (d) <body>
-
13.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Guava</li>
<li>Jamun</li>
</ul> - 14.Which of these is true of a web browser? (a) is where we type code (b) hosts websites online (c) stores a website’s files (d) turns HTML into a page
-
15.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red</p> - 16.🔗 Which code links to about.html? (a) <link about.html> (b) <a alt="about.html"> (c) <a href="about.html"> (d) <a src="about.html">
-
17.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="350"> (a) A red kite (b) cake.jpg (c) kite.png (d) map.png - 18.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
-
19.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="350"> (a) An old fort (b) A tiger asleep (c) width (d) fort.jpg -
20.🔗 Where does this link open?
<a href="games.html" target="_blank">Art corner</a> (a) in a new tab (b) in the same tab -
21.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high</p> - 22.True or false: HTML on its own can show paragraphs. (a) False (b) True
- 23.🔍 Which is the odd one out? (a) stores a website’s files (b) hosts websites online (c) sends pages over the net (d) turns HTML into a page
-
24.🔍 One closing tag is missing. Which one?
<h1>My pets
<h3>I love mangoes.</h3>
<u>Cricket is fun.</u> (a) </p> (b) </u> (c) </h1> (d) </h3> - 25.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 26.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h5>? (a) <h1> (b) <h4> (c) <h2> (d) <h5>
- 27.Which of these goes in the head? (a) <h1> (b) <link rel="stylesheet"> (c) <a> (d) <table>
- 28.Which of these is an opening tag? (a) </p> (b) </title> (c) <li> (d) </h1>
- 29.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as one space (c) as a new line (d) as 5 spaces
-
30.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Stars shine</p> - 31.📄 Where does the text of <title> appear? (a) in a big heading (b) on the browser tab (c) at the bottom (d) nowhere
- 32.Which of these is an empty tag? (a) <li> (b) <title> (c) <br> (d) <b>
-
33.🔗 Which address opens when you click this link?
<a href="games.html">Maths fun</a> (a) contact.html (b) about.html (c) games.html (d) Maths fun - 34.Which of these is true of a web browser? (a) shows line numbers (b) is where we type code (c) opens web pages for us (d) saves our .html files
-
35.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<h2>I love mangoes.</h2>
<h2>Our school trip</h2>
<p>The red kite</p>
<h2>The red kite</h2> - 36.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 37.💾 A web page file usually ends with which extension? (a) .txt (b) .png (c) .html (d) .mp3
- 38.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) editor (c) address (d) element
- 39.True or false: in <img>, alt sets how tall it is. (a) False (b) True
- 40.🌐 Which one answers page requests? (a) a web browser (b) a code editor (c) a web server
Answer key
- <ul>
- colours code to help us
- <a>
- My pets
- A tiger asleep
- 50
- </b>
- a web browser
- </h3>
- in the body
- <title>
- </title>
- 3
- turns HTML into a page
- 2
- <a href="about.html">
- kite.png
- in the head
- An old fort
- in a new tab
- 2
- True
- turns HTML into a page
- </h1>
- an empty tag
- <h1>
- <link rel="stylesheet">
- <li>
- as one space
- 2
- on the browser tab
- <br>
- games.html
- opens web pages for us
- 2
- a closing tag
- .html
- element
- False
- a web server
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids