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 is the odd one out? (a) opens web pages for us (b) shows pages from the web (c) turns HTML into a page (d) colours code to help us
- 2.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <h1> (d) <p>
- 3.🔍 Which is the odd one out? (a) stores a website’s files (b) sends pages over the net (c) hosts websites online (d) shows line numbers
- 4.True or false: a code editor shows line numbers. (a) True (b) False
- 5.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h3> or <h5>? (a) <h2> (b) <h4> (c) <h3> (d) <h5>
- 6.True or false: <ul> lists steps in order. (a) False (b) True
-
7.🔠 How many headings are in this code?
<h1>The red kite</h1>
<p>Hello, world!</p>
<p>Our school trip</p>
<p>My best friend</p> - 8.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h1> or <h4>? (a) <h3> (b) <h2> (c) <h1> (d) <h4>
- 9.📋 Which list shows the steps of a recipe best? (a) <br> (b) <hr> (c) <ul> (d) <ol>
- 10.📄 Can HTML on its own count button clicks? (a) No (b) Yes
-
11.📄 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 - 12.True or false: <ol> lists things in any order. (a) True (b) False
- 13.Which of these goes in the head? (a) <h1> (b) <style> (c) <ul> (d) <table>
- 14.Which of these is true of a code editor? (a) has an address bar (b) shows line numbers (c) hosts websites online (d) opens web pages for us
-
15.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="300"> -
16.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<p>Rain today</p>
<p>Hello, world!</p>
<!-- <p>My best friend</p> --> -
17.🔗 Which words do you click on?
<a href="games.html">Art corner</a> (a) games.html (b) href (c) School news (d) Art corner -
18.💬 Which text will NOT show on the page?
<!-- <p>Good morning!</p> -->
<p>Fun facts</p>
<p>Cricket is fun.</p>
<p>The red kite</p> (a) Cricket is fun. (b) Good morning! (c) Fun facts (d) The red kite - 19.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h5> or <h6>? (a) <h3> (b) <h5> (c) <h4> (d) <h6>
- 20.True or false: <meta charset="utf-8"> goes in the body. (a) True (b) False
- 21.Which of these has a closing tag? (a) <br> (b) <title> (c) <meta> (d) <img>
-
22.🔗 Where does this link open?
<a href="quiz.html">Visit the site</a> (a) in a new tab (b) in the same tab -
23.🔗 Where does this link open?
<a href="maths.html">Take the quiz</a> (a) in the same tab (b) in a new tab -
24.🔗 Which address opens when you click this link?
<a href="maths.html">Maths fun</a> (a) art.html (b) news.html (c) maths.html (d) Maths fun - 25.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <ol> (d) <li>
- 26.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 27.🔠 Which heading shows the SMALLEST text: <h6>, <h2>, <h1> or <h3>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
- 28.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as one space (b) as 5 spaces (c) as a dot (d) as a new line
- 29.True or false: <ul> lists things in any order. (a) False (b) True
- 30.💾 A web page file usually ends with which extension? (a) .txt (b) .html (c) .mp3 (d) .png
- 31.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
-
32.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p>
<p>The red kite</p>
<p>Good morning!</p>
<p>My pets</p> -
33.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Stars shine<br>Birds sing<br>Sky is blue<br>Roses are red</p> -
34.🔍 One closing tag is missing. Which one?
<h2>Rain today</h2>
<small>I love mangoes.
<i>My pets</i> (a) </strong> (b) </i> (c) </h2> (d) </small> -
35.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="150"> -
36.🔗 Which words do you click on?
<a href="games.html">School news</a> (a) games.html (b) School news (c) href (d) Take the quiz -
37.🔍 One closing tag is missing. Which one?
<h2>I love mangoes.</h2>
<h1>Hello, world!</h1>
<p>Cricket is fun. (a) </strong> (b) </h2> (c) </h1> (d) </p> - 38.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
- 39.Which of these is true of a web server? (a) saves our .html files (b) is where we type code (c) has an address bar (d) sends pages over the net
- 40.📝 What does <hr> draw? (a) a line across the page (b) a picture (c) a table (d) a link
Answer key
- colours code to help us
- <h1>
- shows line numbers
- True
- <h5>
- False
- 1
- <h1>
- <ol>
- No
- Space Facts
- False
- <style>
- shows line numbers
- 300
- 3
- Art corner
- Good morning!
- <h6>
- False
- <title>
- in the same tab
- in the same tab
- maths.html
- <li>
- a closing tag
- <h6>
- as one space
- True
- .html
- in the body
- 4
- 5
- </small>
- 150
- School news
- </p>
- 6
- sends pages over the net
- a line across the page
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids