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 attribute of <img> is read by screen readers? (a) height (b) src (c) width (d) alt
- 2.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
- 3.Which of these is a closing tag? (a) <h1> (b) <b> (c) <body> (d) </b>
- 4.📄 Can HTML on its own count button clicks? (a) No (b) Yes
- 5.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
-
6.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="200"> (a) cake.jpg (b) dog.jpg (c) Map of India (d) map.png - 7.True or false: in <img>, width sets how wide it is. (a) False (b) True
- 8.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h5> or <h1>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
- 9.True or false: in <img>, alt sets how wide it is. (a) True (b) False
- 10.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h3> or <h1>? (a) <h1> (b) <h3> (c) <h6> (d) <h5>
- 11.🖼️ Does <img> need a closing tag? (a) No (b) Yes
-
12.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Hello, world!</p>
<!-- <p>Our school trip</p> --> (a) Our school trip (b) I love mangoes. (c) Hello, world! - 13.True or false: in <img>, height is read by screen readers. (a) False (b) True
- 14.🖼️ Which attribute of <img> describes the picture? (a) alt (b) width (c) height (d) src
-
15.🔗 Which words do you click on?
<a href="art.html">Play games</a> (a) art.html (b) About us (c) href (d) Play games - 16.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
-
17.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Fun facts</p>
<p>I love mangoes.</p> - 18.True or false: a web server stores a website’s files. (a) False (b) True
- 19.🖼️ Which tag puts a picture on a page? (a) <img> (b) <p> (c) <pic> (d) <a>
-
20.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="250"> (a) kite.png (b) map.png (c) cake.jpg (d) A red kite -
21.🔍 Which line is missing its closing tag?
line 1: <b>Cricket is fun.</b>
line 2: <u>My best friend</u>
line 3: <i>Good morning! (a) line 1 (b) line 3 (c) line 2 -
22.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Good morning!</p>
<p>Fun facts</p> -
23.🔍 One closing tag is missing. Which one?
<strong>Fun facts
<em>My pets</em>
<b>Cricket is fun.</b> (a) </em> (b) </b> (c) </h2> (d) </strong> - 24.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to colour it (d) to load it faster
- 25.True or false: <ul> is an empty tag. (a) True (b) False
-
26.🔗 Which address opens when you click this link?
<a href="games.html">Contact us</a> (a) Contact us (b) contact.html (c) about.html (d) games.html - 27.Which of these is true of a code editor? (a) shows pages from the web (b) is where we type code (c) sends pages over the net (d) opens web pages for us
- 28.True or false: a code editor colours code to help us. (a) True (b) False
- 29.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
30.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Good morning!</p>
<p>Rain today</p>
<p>Cricket is fun.</p>
<p>My pets</p>
<h2>The red kite</h2> - 31.🔠 Which heading shows the BIGGEST text: <h5>, <h4>, <h3> or <h1>? (a) <h5> (b) <h3> (c) <h4> (d) <h1>
- 32.🔍 Which is the odd one out? (a) answers page requests (b) shows pages from the web (c) has an address bar (d) opens web pages for us
- 33.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <p> (d) <h3>
- 34.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) height (c) alt (d) width
-
35.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="350"> (a) kite.png (b) An old fort (c) tiger.jpg (d) fort.jpg -
36.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Good morning!</p>
<p>Hello, world!</p> (a) Hello, world! (b) Good morning! (c) My best friend -
37.🔗 Which address opens when you click this link?
<a href="news.html">Play games</a> (a) Play games (b) games.html (c) quiz.html (d) news.html - 38.🔠 Which heading shows the BIGGEST text: <h4>, <h3>, <h2> or <h6>? (a) <h4> (b) <h3> (c) <h2> (d) <h6>
- 39.🔠 How many <h1> headings should a page usually have? (a) 3 (b) 1 (c) 6 (d) 10
-
40.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>Rain today</p>
<p>Hello, world!</p> (a) Rain today (b) Hello, world! (c) Fun facts
Answer key
- alt
- <li>
- </b>
- No
- <ul>
- map.png
- True
- <h1>
- False
- <h1>
- No
- Our school trip
- False
- alt
- Play games
- <ul>
- 2
- True
- <img>
- kite.png
- line 3
- 2
- </strong>
- to describe the image
- False
- games.html
- is where we type code
- True
- Yes
- 5
- <h1>
- answers page requests
- <h6>
- height
- fort.jpg
- My best friend
- news.html
- <h2>
- 1
- Fun facts
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids