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 paragraphs does this code make?
<p>Rain today</p>
<h2>Good morning!</h2>
<h2>Our school trip</h2> -
2.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="150"> (a) dog.jpg (b) moon.png (c) cake.jpg (d) Birthday cake -
3.🔗 Which words do you click on?
<a href="about.html">Maths fun</a> (a) Art corner (b) about.html (c) href (d) Maths fun - 4.📝 What do we need to write HTML? (a) a printer (b) a paintbrush (c) a plain text editor (d) a microphone
- 5.True or false: HTML on its own can make links to pages. (a) False (b) True
-
6.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="50"> (a) tiger.jpg (b) A tiger asleep (c) A red kite (d) width -
7.🔗 Which address opens when you click this link?
<a href="games.html">About us</a> (a) contact.html (b) About us (c) about.html (d) games.html -
8.📋 What number does the browser show next to “Guava”?
<ol>
<li>Orange</li>
<li>Litchi</li>
<li>Mango</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Guava</li>
</ol> -
9.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red<br>Sky is blue<br>Birds sing<br>Kites fly high</p> - 10.Which of these goes in the head? (a) <h1> (b) <link rel="stylesheet"> (c) <p> (d) <img>
- 11.Which of these is an empty tag? (a) <title> (b) <h1> (c) <br> (d) <b>
- 12.📋 Which tag goes around each item of a list? (a) <ul> (b) <ol> (c) <p> (d) <li>
- 13.Which of these is a closing tag? (a) <body> (b) </b> (c) <title> (d) <h1>
- 14.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h6> or <h2>? (a) <h2> (b) <h4> (c) <h6> (d) <h3>
- 15.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) alt (c) width (d) height
- 16.🔠 Which tag is the least important heading? (a) <h3> (b) <p> (c) <h6> (d) <h1>
-
17.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>Hello, world!</p>
<p>Rain today</p>
<p>Fun facts</p> (a) Rain today (b) Fun facts (c) Our school trip (d) Hello, world! - 18.Which of these has a closing tag? (a) <img> (b) <hr> (c) <title> (d) <br>
-
19.🔗 Where does this link open?
<a href="about.html">Art corner</a> (a) in the same tab (b) in a new tab -
20.📋 What number does the browser show next to “Banana”?
<ol start="5">
<li>Jamun</li>
<li>Litchi</li>
<li>Orange</li>
<li>Papaya</li>
<li>Mango</li>
<li>Banana</li>
</ol> -
21.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Good morning!</p> -->
<p>Rain today</p>
<p>My best friend</p> - 22.🏷️ HTML marks up text using ___. (a) pixels (b) tags (c) wires (d) keys
- 23.🔍 Which is the odd one out? (a) opens web pages for us (b) turns HTML into a page (c) has an address bar (d) is where we type code
- 24.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <br> (c) <p> (d) <h6>
-
25.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>Fun facts</h2>
<h4>Our school trip</h4>
<p>I love mangoes.</p> - 26.🖼️ Which attribute of <img> shows if the image fails? (a) alt (b) width (c) height (d) src
-
27.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) A red kite (b) tiger.jpg (c) A tiger asleep (d) width -
28.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Banana</li>
<li>Jamun</li>
<li>Guava</li>
<li>Litchi</li>
<li>Orange</li>
</ul> -
29.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="400"> (a) The full moon (b) fort.jpg (c) moon.png (d) bus.jpg - 30.📋 Which list tag lists steps in order? (a) <ul> (b) <ol> (c) <li>
- 31.🖼️ Which attribute of <img> names the picture file? (a) height (b) alt (c) width (d) src
- 32.📄 Can HTML on its own count button clicks? (a) Yes (b) No
-
33.📋 How many items does this list show?
<ul>
<li>Jamun</li>
<li>Grapes</li>
<li>Banana</li>
<li>Guava</li>
<li>Litchi</li>
</ul> -
34.🔗 Which words do you click on?
<a href="contact.html">Art corner</a> (a) Art corner (b) School news (c) contact.html (d) href -
35.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>Our school trip</p> - 36.True or false: <li> is an empty tag. (a) False (b) True
-
37.🔍 Which line is missing its closing tag?
line 1: <i>Cricket is fun.</i>
line 2: <b>Our school trip</b>
line 3: <small>Hello, world! (a) line 3 (b) line 1 (c) line 2 - 38.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
39.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p>
<!-- <p>Rain today</p> -->
<!-- <p>My best friend</p> --> - 40.True or false: HTML on its own can run a game loop. (a) False (b) True
Answer key
- 1
- cake.jpg
- Maths fun
- a plain text editor
- True
- A tiger asleep
- games.html
- 6
- 5
- <link rel="stylesheet">
- <br>
- <li>
- </b>
- <h6>
- alt
- <h6>
- Our school trip
- <title>
- in the same tab
- 10
- 2
- tags
- is where we type code
- <h1>
- 3
- alt
- A tiger asleep
- 6
- moon.png
- <ol>
- src
- No
- 5
- Art corner
- 3
- False
- line 3
- has a closing tag
- 2
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids