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 an empty tag? (a) <h1> (b) <img> (c) <li> (d) <ul>
-
2.🔍 One closing tag is missing. Which one?
<h1>The red kite</h1>
<p>Hello, world!</p>
<h3>My pets (a) </p> (b) </u> (c) </h1> (d) </h3> - 3.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
-
4.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Rain today</p>
<h2>Cricket is fun.</h2> -
5.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<h2>Cricket is fun.</h2>
<h4>Rain today</h4>
<h3>My pets</h3> - 6.📝 What does <hr> draw? (a) a link (b) a table (c) a line across the page (d) a picture
- 7.Which of these is a closing tag? (a) <title> (b) <p> (c) </p> (d) <b>
- 8.🔗 What does HyperText mean? (a) very big text (b) secret text (c) text in colour (d) text with links
- 9.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
- 10.True or false: in <img>, width names the picture file. (a) False (b) True
- 11.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) href (d) id
-
12.💬 How many paragraphs show on the page?
<p>My best friend</p>
<!-- <p>My pets</p> -->
<!-- <p>Cricket is fun.</p> -->
<!-- <p>Fun facts</p> --> - 13.True or false: <ul> lists steps in order. (a) False (b) True
- 14.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
- 15.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
-
16.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<h2>Fun facts</h2>
<p>Our school trip</p> - 17.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 18.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 19.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a hash # (c) a dollar $ (d) a dot .
-
20.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red</p> - 21.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 22.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ol> (c) <hr> (d) <ul>
- 23.True or false: a web browser shows pages from the web. (a) True (b) False
- 24.🌐 Which one has an address bar? (a) a web server (b) a code editor (c) a web browser
- 25.Which of these goes in the head? (a) <h1> (b) <style> (c) <a> (d) <img>
- 26.True or false: in <img>, src sets how wide it is. (a) False (b) True
- 27.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
28.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="400"> (a) Map of India (b) cake.jpg (c) map.png (d) dog.jpg - 29.True or false: <ul> lists things in any order. (a) False (b) True
- 30.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <a> (d) <meta charset="utf-8">
- 31.True or false: <table> goes in the body. (a) True (b) False
- 32.Which of these is an empty tag? (a) <title> (b) <p> (c) <br> (d) <ul>
- 33.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h5> or <h2>? (a) <h1> (b) <h3> (c) <h2> (d) <h5>
- 34.Which of these is true of a code editor? (a) answers page requests (b) saves our .html files (c) opens web pages for us (d) hosts websites online
- 35.🔠 Are headings shown in bold by default? (a) Yes (b) No
- 36.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
-
37.🔗 Where does this link open?
<a href="https://example.com">Play games</a> (a) in the same tab (b) in a new tab - 38.📝 What does <br> do? (a) adds a picture (b) starts a new line (c) makes text bold (d) makes a list
-
39.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<p>Fun facts</p>
<!-- <p>Good morning!</p> -->
<p>Cricket is fun.</p>
<!-- <p>Our school trip</p> --> - 40.Which of these is a closing tag? (a) <p> (b) <li> (c) </body> (d) <title>
Answer key
- <img>
- </h3>
- <ul>
- 2
- 4
- a line across the page
- </p>
- text with links
- a web browser
- False
- href
- 1
- False
- False
- Yes
- 2
- an opening tag
- in the head
- a slash /
- 2
- has a closing tag
- <ol>
- True
- a web browser
- <style>
- False
- has a closing tag
- map.png
- True
- <a>
- True
- <br>
- <h5>
- saves our .html files
- Yes
- <a>
- in the same tab
- starts a new line
- 2
- </body>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids