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="dog.jpg" alt="A happy dog" width="400"> (a) The full moon (b) dog.jpg (c) width (d) A happy dog - 2.🌐 Which one shows line numbers? (a) a web browser (b) a code editor (c) a web server
- 3.True or false: <hr> has a closing tag. (a) False (b) True
-
4.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="200"> (a) The full moon (b) dog.jpg (c) width (d) A happy dog -
5.💬 How many paragraphs show on the page?
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> --> - 6.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
7.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="300"> (a) dog.jpg (b) Map of India (c) map.png (d) cake.jpg - 8.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h6> or <h3>? (a) <h5> (b) <h6> (c) <h2> (d) <h3>
-
9.📋 What number does the browser show next to “Grapes”?
<ol start="9">
<li>Orange</li>
<li>Grapes</li>
<li>Mango</li>
</ol> - 10.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
11.🔗 Which address opens when you click this link?
<a href="news.html">About us</a> (a) news.html (b) games.html (c) About us (d) quiz.html -
12.💬 How many paragraphs show on the page?
<p>Good morning!</p>
<p>Cricket is fun.</p>
<!-- <p>My pets</p> -->
<p>Rain today</p> -
13.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> --> (a) Hello, world! (b) Cricket is fun. (c) I love mangoes. -
14.📝 How many paragraphs does this code make?
<p>The red kite</p>
<h2>Fun facts</h2>
<p>The red kite</p> - 15.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h2> or <h1>? (a) <h1> (b) <h2> (c) <h6> (d) <h4>
- 16.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
-
17.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p> (a) Cricket is fun. (b) I love mangoes. (c) The red kite - 18.🔠 Which tag is the least important heading? (a) <h6> (b) <p> (c) <h3> (d) <h1>
-
19.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Our school trip</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>I love mangoes.</p> --> - 20.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 21.Which of these has a closing tag? (a) <img> (b) <br> (c) <hr> (d) <ul>
- 22.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 23.🔠 How many heading levels does HTML have? (a) 6 (b) 4 (c) 3 (d) 10
-
24.📋 Does this list show bullets or numbers?
<ul>
<li>Mango</li>
<li>Orange</li>
<li>Banana</li>
</ul> (a) numbers (b) bullets -
25.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Grapes</li>
</ol> - 26.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h6> or <h5>? (a) <h1> (b) <h5> (c) <h6> (d) <h3>
-
27.🔗 Which words do you click on?
<a href="quiz.html">Art corner</a> (a) quiz.html (b) Art corner (c) School news (d) href -
28.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>Hello, world!</p>
<!-- <p>Rain today</p> -->
<!-- <p>My best friend</p> --> - 29.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h2> or <h4>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
-
30.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="100"> - 31.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
-
32.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p>
<p>Good morning!</p> (a) Good morning! (b) I love mangoes. (c) Hello, world! - 33.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) < (d) [
- 34.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h2> or <h1>? (a) <h5> (b) <h2> (c) <h1> (d) <h3>
-
35.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Good morning!</p>
<p>My pets</p>
<h2>The red kite</h2>
<h2>Cricket is fun.</h2> -
36.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Roses are red</p> -
37.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 38.🖼️ 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
-
39.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>My pets</p>
<p>Hello, world!</p> - 40.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the head (d) the body
Answer key
- A happy dog
- a code editor
- False
- A happy dog
- 2
- No
- map.png
- <h2>
- 10
- a closing tag
- news.html
- 3
- Cricket is fun.
- 2
- <h6>
- Yes
- I love mangoes.
- <h6>
- 1
- an empty tag
- <ul>
- has a closing tag
- 6
- bullets
- 2
- <h6>
- Art corner
- 2
- <h4>
- 100
- in the head
- I love mangoes.
- <
- <h1>
- 3
- 2
- in a new tab
- to describe the image
- 2
- the body
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids