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.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>The red kite</p>
<h3>Our school trip</h3>
<p>Our school trip</p>
<h3>My best friend</h3> - 2.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
-
3.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="300"> - 4.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
- 5.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
- 6.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h1> (d) <h5>
- 7.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
- 8.🔠 How many heading levels does HTML have? (a) 6 (b) 3 (c) 10 (d) 4
-
9.🔗 Which words do you click on?
<a href="quiz.html">Take the quiz</a> (a) Take the quiz (b) Play games (c) quiz.html (d) href - 10.📝 What does <hr> draw? (a) a table (b) a picture (c) a link (d) a line across the page
-
11.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p>
<!-- <p>My pets</p> --> -
12.🔗 Which address opens when you click this link?
<a href="about.html">Visit the site</a> (a) Visit the site (b) contact.html (c) https://example.com (d) about.html - 13.True or false: <ol> lists steps in order. (a) False (b) True
- 14.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) width (d) height
-
15.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="350"> - 16.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h2> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
-
17.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>Rain today</p>
<p>Fun facts</p>
<p>Cricket is fun.</p> (a) Fun facts (b) Cricket is fun. (c) Rain today (d) The red kite -
18.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<p>Rain today</p> (a) I love mangoes. (b) My pets (c) Rain today (d) Cricket is fun. - 19.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
-
20.🔍 One closing tag is missing. Which one?
<h3>Rain today</h3>
<em>Hello, world!
<b>I love mangoes.</b> (a) </em> (b) </h3> (c) </b> (d) </h2> - 21.🧱 HTML gives a web page its ___. (a) colours (b) speed (c) structure (d) sound
- 22.True or false: in <img>, src shows if the image fails. (a) True (b) False
- 23.Which of these is an empty tag? (a) <h1> (b) <title> (c) <input> (d) <li>
- 24.🔢 In a basic web page file, which comes first: “<!DOCTYPE html>” or “<html>”? (a) <html> (b) <!DOCTYPE html>
-
25.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="100"> - 26.True or false: <style> goes in the body. (a) True (b) False
- 27.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
- 28.📄 Where does <table> go: in the head or in the body? (a) in the head (b) in the body
-
29.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Rain today</p>
<p>I love mangoes.</p>
<h2>Good morning!</h2>
<p>Hello, world!</p> - 30.🌐 Which one opens web pages for us? (a) a code editor (b) a web server (c) a web browser
-
31.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Rain today</p>
<h3>Cricket is fun.</h3>
<p>Cricket is fun.</p> -
32.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue<br>Stars shine</p> - 33.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
-
34.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>The red kite</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>Rain today</p> --> - 35.True or false: <p> goes in the head. (a) False (b) True
- 36.True or false: in <img>, height is read by screen readers. (a) True (b) False
- 37.🔤 In “HTML”, what does the L stand for? (a) Link (b) Line (c) Language (d) Laptop
-
38.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="400"> (a) An old fort (b) tiger.jpg (c) fort.jpg (d) kite.png -
39.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>My best friend</p>
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Fun facts</p> --> - 40.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
Answer key
- 3
- in the head
- 300
- <li>
- element
- <h1>
- <ul>
- 6
- Take the quiz
- a line across the page
- 1
- about.html
- True
- height
- 350
- <h1>
- The red kite
- My pets
- -->
- </em>
- structure
- False
- <input>
- <!DOCTYPE html>
- 100
- False
- to leave notes
- in the body
- 4
- a web browser
- 2
- 3
- <ol>
- 1
- False
- False
- Language
- fort.jpg
- 2
- in the body
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids