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 is the closing tag for <small>? (a) <small> (b) </small> (c) <\small> (d) <small/>
-
2.🔍 Which line is missing its closing tag?
line 1: <u>Good morning!
line 2: <b>My pets</b>
line 3: <em>I love mangoes.</em> (a) line 3 (b) line 2 (c) line 1 - 3.True or false: <ul> goes in the body. (a) False (b) True
- 4.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
- 5.Which of these is an opening tag? (a) </h1> (b) </li> (c) </title> (d) <li>
-
6.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<!-- <p>My pets</p> -->
<p>Cricket is fun.</p> (a) Cricket is fun. (b) My pets (c) Good morning! - 7.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) alt (d) src
-
8.🔗 Which address opens when you click this link?
<a href="about.html">Maths fun</a> (a) Maths fun (b) https://example.com (c) about.html (d) contact.html -
9.🔍 One closing tag is missing. Which one?
<h1>My pets
<h3>I love mangoes.</h3>
<i>Rain today</i> (a) </h3> (b) </small> (c) </i> (d) </h1> -
10.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) My Hobbies (c) Easy snacks (d) body - 11.True or false: HTML on its own cannot make tables. (a) True (b) False
- 12.🔠 Which tag is the least important heading? (a) <h1> (b) <h6> (c) <h3> (d) <p>
- 13.🖼️ Which tag puts a picture on a page? (a) <a> (b) <img> (c) <pic> (d) <p>
-
14.🔗 Which address opens when you click this link?
<a href="quiz.html">School news</a> (a) about.html (b) games.html (c) School news (d) quiz.html - 15.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
- 16.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
- 17.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h1> or <h6>? (a) <h1> (b) <h4> (c) <h6> (d) <h5>
- 18.Which of these is true of a code editor? (a) opens web pages for us (b) is where we type code (c) hosts websites online (d) answers page requests
-
19.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) Birthday cake (b) cake.jpg (c) dog.jpg (d) moon.png -
20.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Orange</li>
<li>Guava</li>
</ul> (a) bullets (b) numbers - 21.Which of these is true of a code editor? (a) saves our .html files (b) turns HTML into a page (c) shows pages from the web (d) has an address bar
- 22.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
23.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Stars shine<br>Kites fly high<br>Roses are red<br>Sky is blue</p> - 24.🔠 Which heading shows the SMALLEST text: <h1>, <h6>, <h3> or <h4>? (a) <h6> (b) <h3> (c) <h4> (d) <h1>
-
25.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>Good morning!</p>
<!-- <p>Rain today</p> --> -
26.💬 Which text will NOT show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p>
<p>My pets</p>
<p>I love mangoes.</p> (a) My pets (b) Cricket is fun. (c) Fun facts (d) I love mangoes. - 27.Which of these is true of a web browser? (a) saves our .html files (b) turns HTML into a page (c) shows line numbers (d) answers page requests
-
28.🔗 Which words do you click on?
<a href="quiz.html">School news</a> (a) School news (b) href (c) quiz.html (d) Take the quiz - 29.🔗 Which tag makes a clickable link? (a) <p> (b) <link> (c) <img> (d) <a>
- 30.True or false: <h1> goes in the head. (a) False (b) True
-
31.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Roses are red</p> -
32.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>My best friend</p>
<p>Our school trip</p>
<!-- <p>Hello, world!</p> --> (a) Hello, world! (b) Our school trip (c) Rain today (d) My best friend -
33.🔍 Which line is missing its closing tag?
line 1: <strong>My best friend
line 2: <h3>Cricket is fun.</h3>
line 3: <h2>My pets</h2> (a) line 2 (b) line 3 (c) line 1 - 34.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
-
35.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> --> -
36.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="300"> -
37.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>My pets</p>
<p>My pets</p> -
38.🔗 Where does this link open?
<a href="art.html">Maths fun</a> (a) in the same tab (b) in a new tab - 39.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
40.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="350"> (a) tiger.jpg (b) fort.jpg (c) bus.jpg (d) Our school bus
Answer key
- </small>
- line 1
- True
- a code editor
- <li>
- My pets
- src
- about.html
- </h1>
- Easy snacks
- False
- <h6>
- <img>
- quiz.html
- <li>
- to leave notes
- <h1>
- is where we type code
- cake.jpg
- bullets
- saves our .html files
- Yes
- 5
- <h6>
- 2
- Cricket is fun.
- turns HTML into a page
- School news
- <a>
- False
- 2
- Hello, world!
- line 1
- False
- 2
- 300
- 3
- in the same tab
- Yes
- bus.jpg
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids