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="bus.jpg" alt="Our school bus" width="400"> (a) bus.jpg (b) An old fort (c) width (d) Our school bus -
2.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) Play games (b) maths.html (c) href (d) Take the quiz - 3.💬 Why do coders write comments? (a) to leave notes (b) to show pictures (c) to make links (d) to add colour
-
4.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) moon.png (b) cake.jpg (c) dog.jpg (d) Birthday cake -
5.🔗 Where does this link open?
<a href="art.html" target="_blank">Take the quiz</a> (a) in the same tab (b) in a new tab -
6.🔍 Which line is missing its closing tag?
line 1: <u>Hello, world!</u>
line 2: <h2>Our school trip</h2>
line 3: <h1>My pets (a) line 1 (b) line 3 (c) line 2 - 7.💬 How does an HTML comment end? (a) // (b) */ (c) >> (d) -->
-
8.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Birds sing<br>Sky is blue</p> -
9.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p>
<!-- <p>My pets</p> -->
<!-- <p>Hello, world!</p> --> - 10.True or false: HTML on its own cannot pick a random number. (a) True (b) False
- 11.📄 Can HTML on its own run a game loop? (a) Yes (b) No
- 12.💬 How does an HTML comment start? (a) // (b) # (c) <!-- (d) /*
-
13.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h2>Hello, world!</h2>
<h3>My best friend</h3>
<h4>Rain today</h4>
<p>Rain today</p> - 14.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
-
15.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="300"> (a) moon.png (b) A happy dog (c) bus.jpg (d) dog.jpg -
16.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>My pets</p> -->
<!-- <p>Good morning!</p> --> - 17.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Link (d) Language
-
18.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<h2>Hello, world!</h2>
<p>Good morning!</p> -
19.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Banana</li>
<li>Litchi</li>
<li>Grapes</li>
<li>Mango</li>
<li>Jamun</li>
</ul> -
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="300"> (a) Our school bus (b) The full moon (c) moon.png (d) width -
21.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) Easy snacks (b) Cricket Club (c) We won by 5 runs. (d) index.html -
22.📋 What number does the browser show next to “Papaya”?
<ol start="4">
<li>Jamun</li>
<li>Grapes</li>
<li>Litchi</li>
<li>Papaya</li>
<li>Guava</li>
<li>Orange</li>
</ol> -
23.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Orange</li>
<li>Banana</li>
<li>Papaya</li>
<li>Litchi</li>
<li>Mango</li>
</ul> -
24.🔍 One closing tag is missing. Which one?
<h2>Hello, world!</h2>
<b>The red kite</b>
<h1>Good morning! (a) </h3> (b) </b> (c) </h1> (d) </h2> -
25.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Guava</li>
</ol> -
26.🔍 Which line is missing its closing tag?
line 1: <h2>Good morning!</h2>
line 2: <strong>I love mangoes.
line 3: <h3>Our school trip</h3> (a) line 3 (b) line 2 (c) line 1 -
27.🔍 One closing tag is missing. Which one?
<h1>Our school trip</h1>
<small>My pets</small>
<em>Good morning! (a) </small> (b) </strong> (c) </em> (d) </h1> -
28.🔗 Which words do you click on?
<a href="maths.html">School news</a> (a) href (b) Take the quiz (c) maths.html (d) School news - 29.📄 Can HTML on its own make headings? (a) No (b) Yes
- 30.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h1> or <h5>? (a) <h6> (b) <h4> (c) <h1> (d) <h5>
- 31.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
-
32.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) Mars is red. (b) Welcome! (c) index.html (d) Space Facts - 33.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
- 34.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) id (d) href
- 35.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h1> or <h5>? (a) <h5> (b) <h1> (c) <h4> (d) <h6>
-
36.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="350"> - 37.📝 What does <p> make? (a) a paragraph (b) a link (c) a table (d) a picture
-
38.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Fun facts</p>
<h2>The red kite</h2>
<p>Rain today</p> - 39.True or false: <ul> has a closing tag. (a) True (b) False
-
40.🔗 Which words do you click on?
<a href="about.html">Take the quiz</a> (a) Play games (b) about.html (c) href (d) Take the quiz
Answer key
- Our school bus
- Take the quiz
- to leave notes
- cake.jpg
- in a new tab
- line 3
- -->
- 3
- 1
- True
- No
- <!--
- 4
- in the body
- dog.jpg
- 1
- Language
- 2
- 6
- The full moon
- Cricket Club
- 7
- 6
- </h1>
- 2
- line 2
- </em>
- School news
- Yes
- <h1>
- Yes
- Space Facts
- opens it in a new tab
- href
- <h6>
- 350
- a paragraph
- 3
- True
- Take the quiz
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids