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.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h2>Our school trip</h2>
<h2>I love mangoes.</h2>
<h4>Fun facts</h4>
<p>Our school trip</p> - 2.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
-
3.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>Hello, world!</p>
<!-- <p>Fun facts</p> --> (a) Hello, world! (b) Good morning! (c) Fun facts - 4.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
-
5.🔗 Which words do you click on?
<a href="contact.html">Take the quiz</a> (a) contact.html (b) href (c) Play games (d) Take the quiz -
6.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>Rain today</p>
<!-- <p>My best friend</p> -->
<p>Hello, world!</p> (a) Rain today (b) Cricket is fun. (c) My best friend (d) Hello, world! -
7.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Cricket is fun.</p>
<h3>Good morning!</h3> -
8.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="350"> (a) Birthday cake (b) map.png (c) Map of India (d) width - 9.Which of these has a closing tag? (a) <hr> (b) <br> (c) <meta> (d) <ul>
-
10.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Rivers flow<br>Sky is blue<br>Kites fly high<br>Roses are red</p> - 11.🏷️ Is </li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 12.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) width (c) src (d) alt
- 13.🏷️ Which is the closing tag for <strong>? (a) <\strong> (b) <strong> (c) </strong> (d) <strong/>
-
14.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="250"> (a) map.png (b) width (c) Map of India (d) Birthday cake - 15.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
- 16.True or false: <a> goes in the body. (a) True (b) False
- 17.Which of these is true of a web server? (a) sends pages over the net (b) saves our .html files (c) colours code to help us (d) shows pages from the web
-
18.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) body (c) Welcome! (d) Art Gallery - 19.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <table> (d) <title>
-
20.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p>
<!-- <p>Rain today</p> -->
<!-- <p>My pets</p> --> - 21.Which of these is a closing tag? (a) <li> (b) </h1> (c) <title> (d) <b>
- 22.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
-
23.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high</p> - 24.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
-
25.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p>
<!-- <p>Fun facts</p> -->
<!-- <p>My pets</p> --> - 26.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) height (d) alt
- 27.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 28.📝 Does <meta> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 29.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h5> or <h2>? (a) <h6> (b) <h5> (c) <h2> (d) <h3>
- 30.True or false: <meta> has a closing tag. (a) True (b) False
- 31.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ol> (c) <br> (d) <ul>
- 32.🔠 Which heading shows the SMALLEST text: <h3>, <h4>, <h2> or <h6>? (a) <h2> (b) <h3> (c) <h4> (d) <h6>
- 33.True or false: HTML on its own can make tables. (a) True (b) False
- 34.True or false: in <img>, alt names the picture file. (a) True (b) False
- 35.💬 Does the browser show comments on the page? (a) No (b) Yes
- 36.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) alt (d) src
- 37.🔗 What does target="_blank" do to a link? (a) makes it blank (b) opens it in a new tab (c) makes it bold (d) hides the link
-
38.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>The red kite</p>
<!-- <p>My best friend</p> --> - 39.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) </body> (c) <!DOCTYPE html> (d) <head>
-
40.💬 How many paragraphs show on the page?
<p>My best friend</p>
<p>I love mangoes.</p>
<!-- <p>The red kite</p> -->
Answer key
- 4
- in the body
- Fun facts
- False
- Take the quiz
- My best friend
- 2
- Map of India
- <ul>
- 5
- a closing tag
- alt
- </strong>
- Map of India
- False
- True
- sends pages over the net
- Welcome!
- <table>
- 2
- </h1>
- in the head
- 2
- a code editor
- 1
- width
- in the body
- an empty tag
- <h2>
- False
- <ul>
- <h6>
- True
- False
- No
- alt
- opens it in a new tab
- 1
- <!DOCTYPE html>
- 2
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids