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.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) A happy dog (b) cake.jpg (c) width (d) Birthday cake - 2.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to colour it (d) to describe the image
-
3.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="150"> (a) moon.png (b) Birthday cake (c) cake.jpg (d) dog.jpg -
4.🔗 Where does this link open?
<a href="quiz.html">School news</a> (a) in a new tab (b) in the same tab - 5.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h6> or <h1>? (a) <h1> (b) <h4> (c) <h6> (d) <h5>
-
6.🔍 Which line is missing its closing tag?
line 1: <em>Rain today</em>
line 2: <h1>Our school trip</h1>
line 3: <u>My pets (a) line 2 (b) line 3 (c) line 1 -
7.📋 What number does the browser show next to “Banana”?
<ol start="8">
<li>Orange</li>
<li>Mango</li>
<li>Litchi</li>
<li>Papaya</li>
<li>Banana</li>
</ol> -
8.🔗 Where does this link open?
<a href="art.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab -
9.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Litchi</li>
<li>Grapes</li>
<li>Mango</li>
</ol> - 10.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h3>? (a) <h2> (b) <h6> (c) <h3> (d) <h1>
-
11.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Rain today</p>
<!-- <p>I love mangoes.</p> -->
<!-- <p>Good morning!</p> --> - 12.True or false: a code editor colours code to help us. (a) False (b) True
-
13.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high<br>Birds sing</p> -
14.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="400"> (a) width (b) map.png (c) Map of India (d) Birthday cake - 15.🔢 In a basic web page file, which comes first: “<body>” or “<!DOCTYPE html>”? (a) <body> (b) <!DOCTYPE html>
- 16.💬 Does the browser show comments on the page? (a) No (b) Yes
-
17.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h2>I love mangoes.</h2>
<p>I love mangoes.</p> - 18.🌐 Which one is where we type code? (a) a web server (b) a code editor (c) a web browser
- 19.True or false: <li> is one item of a list. (a) True (b) False
-
20.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="100"> - 21.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <li> (c) <ul>
- 22.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h3> (d) <h1>
- 23.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h4> or <h3>? (a) <h1> (b) <h5> (c) <h4> (d) <h3>
- 24.🖼️ Which tag puts a picture on a page? (a) <img> (b) <pic> (c) <a> (d) <p>
-
25.🔗 Which words do you click on?
<a href="quiz.html">Play games</a> (a) Play games (b) quiz.html (c) About us (d) href -
26.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Orange</li>
</ul> (a) bullets (b) numbers - 27.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h6>? (a) <h4> (b) <h6> (c) <h3> (d) <h1>
- 28.Which of these is true of a web browser? (a) opens web pages for us (b) shows line numbers (c) answers page requests (d) saves our .html files
- 29.🌐 Which one hosts websites online? (a) a code editor (b) a web server (c) a web browser
- 30.💬 How does an HTML comment end? (a) */ (b) >> (c) --> (d) //
- 31.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
- 32.True or false: <ol> lists steps in order. (a) False (b) True
- 33.📝 Does <br> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 34.📄 Which part holds everything you see on the page? (a) the body (b) the head (c) the doctype (d) the title
- 35.📄 Can HTML on its own make headings? (a) Yes (b) No
-
36.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>The red kite</p>
<!-- <p>Good morning!</p> --> -
37.🔗 Which words do you click on?
<a href="games.html">Contact us</a> (a) Contact us (b) href (c) games.html (d) Visit the site -
38.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets - 39.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h4> or <h6>? (a) <h5> (b) <h1> (c) <h6> (d) <h4>
- 40.🖼️ Which attribute of <img> tells which image to load? (a) height (b) width (c) src (d) alt
Answer key
- Birthday cake
- to describe the image
- cake.jpg
- in the same tab
- <h6>
- line 3
- 12
- in a new tab
- 4
- <h1>
- 1
- True
- 3
- Map of India
- <!DOCTYPE html>
- No
- 2
- a code editor
- True
- 100
- <ol>
- <h6>
- <h1>
- <img>
- Play games
- bullets
- <h6>
- opens web pages for us
- a web server
- -->
- Yes
- True
- an empty tag
- the body
- Yes
- 1
- Contact us
- bullets
- <h1>
- src
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids