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 list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
- 2.True or false: <li> has a closing tag. (a) False (b) True
- 3.True or false: in <img>, height sets how wide it is. (a) True (b) False
- 4.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 5.Which of these is true of a web browser? (a) has an address bar (b) colours code to help us (c) saves our .html files (d) answers page requests
- 6.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
-
7.📋 How many items does this list show?
<ol>
<li>Jamun</li>
<li>Banana</li>
<li>Grapes</li>
<li>Guava</li>
<li>Orange</li>
<li>Papaya</li>
</ol> - 8.📛 In <a href="x.html">, what is href? (a) a closing tag (b) a comment (c) an attribute (d) an element name
- 9.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
- 10.True or false: <ul> is one item of a list. (a) False (b) True
- 11.🖼️ Which attribute of <img> tells which image to load? (a) width (b) alt (c) height (d) src
-
12.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="cake.jpg" alt="Birthday cake" width="400"> (a) cake.jpg (b) Birthday cake (c) A happy dog (d) width -
13.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Fun facts</p> -->
<p>Hello, world!</p>
<!-- <p>Our school trip</p> --> - 14.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
-
15.🔍 Which line is missing its closing tag?
line 1: <small>Cricket is fun.
line 2: <h3>Hello, world!</h3>
line 3: <em>Fun facts</em> (a) line 1 (b) line 3 (c) line 2 -
16.🔗 Which words do you click on?
<a href="contact.html">Contact us</a> (a) Contact us (b) href (c) contact.html (d) Visit the site - 17.📄 Which part holds everything you see on the page? (a) the head (b) the doctype (c) the body (d) the title
- 18.📝 What does <br> do? (a) makes text bold (b) adds a picture (c) makes a list (d) starts a new line
- 19.🏷️ Which is the closing tag for <small>? (a) <\small> (b) <small> (c) <small/> (d) </small>
- 20.Which of these is an opening tag? (a) </h1> (b) </li> (c) <b> (d) </title>
- 21.Which of these goes in the body? (a) <title> (b) <img> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
- 22.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h2>? (a) <h4> (b) <h1> (c) <h5> (d) <h2>
-
23.🔗 Where does this link open?
<a href="https://example.com">School news</a> (a) in a new tab (b) in the same tab - 24.Which of these is a closing tag? (a) <li> (b) <b> (c) </body> (d) <title>
- 25.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
- 26.🔠 Which heading shows the SMALLEST text: <h2>, <h3>, <h6> or <h5>? (a) <h6> (b) <h3> (c) <h5> (d) <h2>
- 27.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <h1/> (c) </h1> (d) <\h1>
-
28.📋 Does this list show bullets or numbers?
<ol>
<li>Papaya</li>
<li>Grapes</li>
<li>Guava</li>
</ol> (a) numbers (b) bullets -
29.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Good morning!</p>
<p>Good morning!</p>
<h3>Cricket is fun.</h3> -
30.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Cricket is fun.</p>
<p>Rain today</p>
<!-- <p>Hello, world!</p> --> (a) My pets (b) Cricket is fun. (c) Hello, world! (d) Rain today - 31.🌐 Which one sends pages over the net? (a) a web browser (b) a code editor (c) a web server
-
32.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Our school trip</p>
<!-- <p>The red kite</p> -->
<p>Cricket is fun.</p> -
33.🔍 Which line is missing its closing tag?
line 1: <h2>I love mangoes.
line 2: <h3>Our school trip</h3>
line 3: <strong>My pets</strong> (a) line 1 (b) line 2 (c) line 3 - 34.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) </html> (c) <head> (d) <!DOCTYPE html>
- 35.True or false: <ul> goes in the head. (a) True (b) False
-
36.💬 Which text will NOT show on the page?
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p>
<p>Our school trip</p> (a) Fun facts (b) Our school trip (c) Cricket is fun. - 37.True or false: <ul> goes in the body. (a) False (b) True
-
38.🔍 Which line is missing its closing tag?
line 1: <h2>Hello, world!
line 2: <p>Cricket is fun.</p>
line 3: <h1>I love mangoes.</h1> (a) line 1 (b) line 2 (c) line 3 -
39.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Easy snacks</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Riya’s Recipes (b) Thanks for visiting. (c) Easy snacks (d) body -
40.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) A happy dog (b) moon.png (c) bus.jpg (d) dog.jpg
Answer key
- <ol>
- True
- False
- in the body
- has an address bar
- in the head
- 6
- an attribute
- <a>
- False
- src
- Birthday cake
- 2
- Yes
- line 1
- Contact us
- the body
- starts a new line
- </small>
- <b>
- <img>
- <h5>
- in the same tab
- </body>
- opens it in a new tab
- <h6>
- </h1>
- numbers
- 2
- Hello, world!
- a web server
- 2
- line 1
- <!DOCTYPE html>
- False
- Fun facts
- True
- line 1
- Easy snacks
- dog.jpg
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids