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.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) href (b) About us (c) Contact us (d) https://example.com -
2.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Match report</h1>
<p>I like to read.</p>
</body>
</html> (a) Art Gallery (b) I like to read. (c) body (d) Match report - 3.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
-
4.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Grapes</li>
<li>Jamun</li>
<li>Banana</li>
<li>Orange</li>
</ul> - 5.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) element (c) attribute (d) address
- 6.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
- 7.True or false: a code editor opens web pages for us. (a) False (b) True
-
8.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>The red kite</p>
<h2>Cricket is fun.</h2> - 9.True or false: HTML on its own can show paragraphs. (a) True (b) False
- 10.🔢 In a basic web page file, which comes first: “</html>” or “</body>”? (a) </body> (b) </html>
-
11.🔗 Which words do you click on?
<a href="maths.html">Art corner</a> (a) maths.html (b) School news (c) href (d) Art corner -
12.🔗 Which address opens when you click this link?
<a href="art.html">About us</a> (a) art.html (b) quiz.html (c) About us (d) news.html -
13.💬 How many paragraphs show on the page?
<p>The red kite</p>
<p>Our school trip</p>
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> --> - 14.📄 Can HTML on its own add up two numbers? (a) Yes (b) No
-
15.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Good morning!</p>
<h2>Good morning!</h2>
<p>Rain today</p>
<p>I love mangoes.</p>
<p>I love mangoes.</p> - 16.🖼️ Which attribute of <img> tells which image to load? (a) width (b) alt (c) src (d) height
- 17.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) { (d) (
- 18.Which of these is a closing tag? (a) <h1> (b) <p> (c) <title> (d) </p>
- 19.Which of these has a closing tag? (a) <img> (b) <ul> (c) <hr> (d) <meta>
-
20.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<p>Rain today</p>
<p>I love mangoes.</p> -
21.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="400"> (a) moon.png (b) cake.jpg (c) Birthday cake (d) dog.jpg - 22.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h3>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
- 23.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h2> or <h1>? (a) <h5> (b) <h1> (c) <h2> (d) <h6>
- 24.True or false: <ol> is one item of a list. (a) True (b) False
- 25.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h4>? (a) <h1> (b) <h2> (c) <h3> (d) <h4>
-
26.🔗 Which words do you click on?
<a href="maths.html">Play games</a> (a) About us (b) Play games (c) href (d) maths.html - 27.🔠 How many <h1> headings should a page usually have? (a) 6 (b) 10 (c) 1 (d) 3
- 28.🌐 Which one answers page requests? (a) a code editor (b) a web browser (c) a web server
-
29.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>The red kite</p>
<!-- <p>Rain today</p> --> - 30.🔤 In “HTML”, what does the M stand for? (a) Mouse (b) Modern (c) Machine (d) Markup
- 31.📄 Can HTML on its own keep a high score? (a) Yes (b) No
- 32.🔢 In a basic web page file, which comes FIRST? (a) <body> (b) </head> (c) <!DOCTYPE html> (d) </html>
- 33.True or false: <ol> lists things in any order. (a) True (b) False
-
34.🔍 One closing tag is missing. Which one?
<strong>The red kite
<p>Our school trip</p>
<i>Rain today</i> (a) </p> (b) </b> (c) </i> (d) </strong> -
35.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>Our school trip</h2>
<p>Rain today</p>
<p>My best friend</p>
<h2>Fun facts</h2>
<h2>My pets</h2> - 36.📄 Where does <ul> go: in the head or in the body? (a) in the body (b) in the head
- 37.Which of these goes in the head? (a) <p> (b) <h1> (c) <ul> (d) <style>
- 38.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h1> or <h3>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
-
39.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Fun facts</p>
<p>Hello, world!</p> -
40.💬 Which text will NOT show on the page?
<!-- <p>Our school trip</p> -->
<p>My pets</p>
<p>Rain today</p>
<p>Good morning!</p> (a) Good morning! (b) My pets (c) Our school trip (d) Rain today
Answer key
- About us
- Match report
- to describe the image
- 5
- element
- <ol>
- False
- 2
- True
- </body>
- Art corner
- art.html
- 3
- No
- 5
- src
- <
- </p>
- <ul>
- 2
- cake.jpg
- <h6>
- <h1>
- False
- <h4>
- Play games
- 1
- a web server
- 1
- Markup
- No
- <!DOCTYPE html>
- False
- </strong>
- 3
- in the body
- <style>
- <h1>
- 2
- Our school trip
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids