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.True or false: a web server saves our .html files. (a) True (b) False
-
2.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing<br>Sky is blue</p> -
3.🔗 Which words do you click on?
<a href="quiz.html">About us</a> (a) quiz.html (b) Contact us (c) About us (d) href -
4.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="350"> (a) map.png (b) width (c) Birthday cake (d) Map of India - 5.🔢 In a basic web page file, which comes first: “</html>” or “<html>”? (a) <html> (b) </html>
- 6.True or false: HTML on its own cannot pick a random number. (a) True (b) False
-
7.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine</p> -
8.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<p>The red kite</p>
<!-- <p>Hello, world!</p> --> - 9.Which of these goes in the body? (a) <ul> (b) <meta charset="utf-8"> (c) <link rel="stylesheet"> (d) <title>
-
10.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Rain today</p> -->
<p>Good morning!</p>
<!-- <p>My pets</p> -->
<p>Our school trip</p> - 11.💬 Does the browser show comments on the page? (a) Yes (b) No
- 12.True or false: <input> has a closing tag. (a) True (b) False
-
13.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<!-- <p>Rain today</p> -->
<p>Our school trip</p> -
14.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="400"> (a) dog.jpg (b) moon.png (c) cake.jpg (d) Birthday cake -
15.📋 What number does the browser show next to “Litchi”?
<ol start="5">
<li>Mango</li>
<li>Banana</li>
<li>Litchi</li>
<li>Guava</li>
<li>Jamun</li>
<li>Orange</li>
</ol> - 16.📄 Which part holds everything you see on the page? (a) the body (b) the doctype (c) the title (d) the head
- 17.🖼️ Which attribute of <img> tells which image to load? (a) width (b) alt (c) height (d) src
- 18.📋 Which list tag is an ordered list? (a) <ul> (b) <li> (c) <ol>
- 19.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
20.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="300"> (a) bus.jpg (b) Our school bus (c) fort.jpg (d) tiger.jpg - 21.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
- 22.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
-
23.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>Rain today</h2>
<p>Rain today</p>
<p>Fun facts</p> - 24.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) width (d) height
- 25.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as a new line (c) as 5 spaces (d) as one space
-
26.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p>
<p>Our school trip</p>
<p>The red kite</p> - 27.📝 Does <h1> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 28.Which of these is true of a web server? (a) saves our .html files (b) opens web pages for us (c) is where we type code (d) stores a website’s files
-
29.🔗 Which address opens when you click this link?
<a href="maths.html">Maths fun</a> (a) maths.html (b) art.html (c) Maths fun (d) news.html -
30.🔗 Which address opens when you click this link?
<a href="games.html">Contact us</a> (a) about.html (b) contact.html (c) games.html (d) Contact us -
31.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="50"> -
32.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>The red kite</p>
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> --> - 33.💬 How does an HTML comment start? (a) # (b) <!-- (c) /* (d) //
- 34.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
-
35.📋 Does this list show bullets or numbers?
<ol>
<li>Banana</li>
<li>Orange</li>
<li>Guava</li>
</ol> (a) bullets (b) numbers - 36.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h6> or <h2>? (a) <h4> (b) <h5> (c) <h2> (d) <h6>
- 37.True or false: HTML on its own can make links to pages. (a) False (b) True
- 38.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2/> (c) </h2> (d) <h2>
- 39.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
-
40.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> (a) tiger.jpg (b) kite.png (c) A tiger asleep (d) map.png
Answer key
- False
- 3
- About us
- Map of India
- <html>
- True
- 2
- 2
- <ul>
- 2
- No
- False
- 1
- cake.jpg
- 7
- the body
- src
- <ol>
- an empty tag
- bus.jpg
- No
- <ol>
- 2
- height
- as one space
- 3
- has a closing tag
- stores a website’s files
- maths.html
- games.html
- 50
- 3
- <!--
- in the head
- numbers
- <h6>
- True
- </h2>
- <ul>
- tiger.jpg
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids