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 tag puts a picture on a page? (a) <pic> (b) <img> (c) <p> (d) <a>
- 2.True or false: <ul> is one item of a list. (a) False (b) True
- 3.True or false: in <img>, height names the picture file. (a) True (b) False
- 4.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) height (c) width (d) src
- 5.True or false: HTML on its own cannot make tables. (a) True (b) False
-
6.💬 Which text will NOT show on the page?
<p>Good morning!</p>
<p>The red kite</p>
<!-- <p>Hello, world!</p> --> (a) The red kite (b) Good morning! (c) Hello, world! - 7.🏷️ Which is the closing tag for <em>? (a) <\em> (b) </em> (c) <em/> (d) <em>
- 8.📋 Which list tag lists steps in order? (a) <ol> (b) <li> (c) <ul>
- 9.📄 Where does the text of <title> appear? (a) on the browser tab (b) nowhere (c) at the bottom (d) in a big heading
- 10.📄 Can HTML on its own keep a high score? (a) Yes (b) No
-
11.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Orange</li>
<li>Litchi</li>
</ol> (a) bullets (b) numbers - 12.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
- 13.True or false: a code editor has an address bar. (a) True (b) False
-
14.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Papaya</li>
<li>Jamun</li>
</ol> (a) bullets (b) numbers - 15.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
16.🔗 Which address opens when you click this link?
<a href="https://example.com">School news</a> (a) https://example.com (b) School news (c) art.html (d) maths.html - 17.📝 What does <hr> draw? (a) a picture (b) a link (c) a line across the page (d) a table
-
18.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>My pets</p>
<!-- <p>I love mangoes.</p> --> (a) I love mangoes. (b) My pets (c) Fun facts - 19.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <html> (c) </body> (d) <!DOCTYPE html>
-
20.🔍 One closing tag is missing. Which one?
<u>Fun facts</u>
<strong>My best friend
<h2>I love mangoes.</h2> (a) </u> (b) </strong> (c) </i> (d) </h2> - 21.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
- 22.Which of these is a closing tag? (a) </li> (b) <body> (c) <h1> (d) <p>
- 23.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 24.True or false: in <img>, width names the picture file. (a) True (b) False
- 25.True or false: in <img>, alt shows if the image fails. (a) False (b) True
-
26.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>Our school trip</p> -->
<!-- <p>Fun facts</p> -->
<p>My pets</p>
<p>I love mangoes.</p> -
27.🔗 Which address opens when you click this link?
<a href="contact.html">Art corner</a> (a) contact.html (b) https://example.com (c) maths.html (d) Art corner - 28.🔍 Which is the odd one out? (a) answers page requests (b) hosts websites online (c) has an address bar (d) stores a website’s files
- 29.True or false: HTML on its own can show paragraphs. (a) True (b) False
-
30.🔗 Which address opens when you click this link?
<a href="maths.html">Art corner</a> (a) maths.html (b) art.html (c) Art corner (d) news.html -
31.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="300"> (a) cake.jpg (b) map.png (c) Map of India (d) dog.jpg - 32.Which of these is true of a web browser? (a) saves our .html files (b) hosts websites online (c) turns HTML into a page (d) is where we type code
- 33.🌐 Which one shows line numbers? (a) a web server (b) a code editor (c) a web browser
- 34.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
-
35.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Our school trip</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Fun facts</p>
<p>My pets</p> -
36.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Roses are red<br>Birds sing</p> - 37.🔗 What does target="_blank" do to a link? (a) hides the link (b) makes it bold (c) makes it blank (d) opens it in a new tab
- 38.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 39.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
40.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h3>Hello, world!</h3>
<h2>Cricket is fun.</h2>
Answer key
- <img>
- False
- False
- width
- False
- Hello, world!
- </em>
- <ol>
- on the browser tab
- No
- numbers
- True
- False
- numbers
- an opening tag
- https://example.com
- a line across the page
- I love mangoes.
- <!DOCTYPE html>
- </strong>
- <ul>
- </li>
- No
- False
- True
- 3
- contact.html
- has an address bar
- True
- maths.html
- map.png
- turns HTML into a page
- a code editor
- in the head
- 3
- 3
- opens it in a new tab
- an opening tag
- a closing tag
- 3
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids