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 of these is true of a web browser? (a) is where we type code (b) colours code to help us (c) turns HTML into a page (d) shows line numbers
-
2.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Orange</li>
</ol> - 3.🏷️ Which is the closing tag for <p>? (a) </p> (b) <p> (c) <\p> (d) <p/>
- 4.True or false: <img> goes in the body. (a) True (b) False
- 5.True or false: a web server shows pages from the web. (a) False (b) True
- 6.True or false: <ol> is an ordered list. (a) True (b) False
-
7.🔠 How many headings are in this code?
<h1>My best friend</h1>
<h2>My pets</h2>
<p>Fun facts</p> -
8.🔍 Which line is missing its closing tag?
line 1: <h2>Hello, world!
line 2: <small>Fun facts</small>
line 3: <h1>Rain today</h1> (a) line 1 (b) line 2 (c) line 3 -
9.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>My pets</p>
<!-- <p>My best friend</p> -->
<!-- <p>I love mangoes.</p> --> - 10.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h5> or <h6>? (a) <h5> (b) <h2> (c) <h3> (d) <h6>
- 11.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
- 12.True or false: in <img>, height tells which image to load. (a) True (b) False
-
13.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Fun facts</p>
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> --> (a) I love mangoes. (b) My best friend (c) Fun facts (d) Hello, world! -
14.🔍 Which line is missing its closing tag?
line 1: <u>Rain today
line 2: <strong>Good morning!</strong>
line 3: <i>I love mangoes.</i> (a) line 1 (b) line 3 (c) line 2 - 15.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h2> or <h6>? (a) <h1> (b) <h6> (c) <h5> (d) <h2>
-
16.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) tiger.jpg (b) width (c) A red kite (d) A tiger asleep - 17.📋 Which list suits a shopping list in any order? (a) <ol> (b) <ul> (c) <br> (d) <hr>
-
18.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>Fun facts</p>
<!-- <p>I love mangoes.</p> --> - 19.Which of these is a closing tag? (a) <title> (b) <b> (c) <h1> (d) </title>
-
20.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="150"> (a) bus.jpg (b) moon.png (c) A happy dog (d) dog.jpg - 21.Which of these is a closing tag? (a) <p> (b) <b> (c) <body> (d) </li>
- 22.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 23.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to describe the image (c) to make it bigger (d) to colour it
- 24.🏷️ Which is the closing tag for <i>? (a) <\i> (b) <i/> (c) </i> (d) <i>
- 25.True or false: <ul> is an unordered list. (a) True (b) False
- 26.True or false: HTML on its own cannot make bullet lists. (a) False (b) True
- 27.🔢 In a basic web page file, which comes LAST? (a) </body> (b) </html> (c) <!DOCTYPE html> (d) </head>
-
28.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>The red kite</p>
<p>Rain today</p>
<p>Rain today</p> - 29.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
- 30.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h3> or <h6>? (a) <h2> (b) <h3> (c) <h5> (d) <h6>
-
31.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p>
<p>Hello, world!</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Fun facts</p> --> - 32.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
-
33.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<!-- <p>Hello, world!</p> -->
<!-- <p>Good morning!</p> -->
<p>The red kite</p>
<!-- <p>My pets</p> --> - 34.📝 What does <br> do? (a) makes a list (b) starts a new line (c) adds a picture (d) makes text bold
- 35.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
-
36.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine<br>Sky is blue<br>Birds sing<br>Kites fly high</p> - 37.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) [ (d) {
-
38.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p>
<!-- <p>The red kite</p> --> - 39.🏷️ Which is the closing tag for <em>? (a) <em> (b) <\em> (c) </em> (d) <em/>
- 40.📄 What is the first line of an HTML5 page? (a) <body> (b) <head> (c) <html> (d) <!DOCTYPE html>
Answer key
- turns HTML into a page
- 2
- </p>
- True
- False
- True
- 2
- line 1
- 1
- <h2>
- <a>
- False
- Hello, world!
- line 1
- <h1>
- A tiger asleep
- <ul>
- 2
- </title>
- dog.jpg
- </li>
- Yes
- to describe the image
- </i>
- True
- False
- </html>
- 4
- in the body
- <h6>
- 2
- in the body
- 1
- starts a new line
- to leave notes
- 5
- <
- 1
- </em>
- <!DOCTYPE html>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids