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 <h1> headings should a page usually have? (a) 1 (b) 6 (c) 3 (d) 10
- 2.True or false: <li> is an empty tag. (a) True (b) False
- 3.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 4.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 5.Which of these is a closing tag? (a) <h1> (b) </h1> (c) <p> (d) <body>
-
6.🔍 Which line is missing its closing tag?
line 1: <i>Fun facts</i>
line 2: <h2>I love mangoes.
line 3: <h1>Good morning!</h1> (a) line 2 (b) line 3 (c) line 1 - 7.Which of these is true of a web server? (a) opens web pages for us (b) turns HTML into a page (c) hosts websites online (d) saves our .html files
- 8.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ol> (d) <ul>
- 9.🏷️ Which is the closing tag for <u>? (a) <u/> (b) </u> (c) <\u> (d) <u>
-
10.🔍 Which line is missing its closing tag?
line 1: <small>Good morning!</small>
line 2: <h1>My best friend</h1>
line 3: <h2>Rain today (a) line 3 (b) line 1 (c) line 2 -
11.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>Fun facts</h2>
<p>Good morning!</p>
<p>Fun facts</p> - 12.🏷️ Which is the closing tag for <i>? (a) </i> (b) <\i> (c) <i/> (d) <i>
-
13.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> -->
<p>Our school trip</p>
<p>My pets</p> - 14.📄 Which part holds everything you see on the page? (a) the title (b) the doctype (c) the body (d) the head
- 15.True or false: in <img>, height tells which image to load. (a) True (b) False
- 16.📋 Which list tag is one item of a list? (a) <ol> (b) <li> (c) <ul>
- 17.📄 Where does the text of <title> appear? (a) nowhere (b) at the bottom (c) in a big heading (d) on the browser tab
-
18.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="250"> (a) An old fort (b) kite.png (c) tiger.jpg (d) fort.jpg -
19.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>My best friend</p> -->
<p>Good morning!</p> (a) I love mangoes. (b) My best friend (c) Good morning! - 20.True or false: HTML on its own cannot make tables. (a) False (b) True
-
21.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="50"> (a) moon.png (b) dog.jpg (c) cake.jpg (d) Birthday cake -
22.🔗 Which address opens when you click this link?
<a href="games.html">Take the quiz</a> (a) Take the quiz (b) contact.html (c) about.html (d) games.html - 23.🔗 Which attribute holds the address of a link? (a) src (b) id (c) href (d) alt
- 24.True or false: <br> has a closing tag. (a) False (b) True
-
25.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Mango</li>
<li>Papaya</li>
</ol> -
26.🔗 Where does this link open?
<a href="https://example.com" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 27.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
-
28.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Mars is red.</p>
</body>
</html> (a) body (b) Mars is red. (c) Art Gallery (d) Welcome! -
29.🔍 Which line is missing its closing tag?
line 1: <h2>Good morning!</h2>
line 2: <em>The red kite</em>
line 3: <i>My pets (a) line 3 (b) line 1 (c) line 2 - 30.🏷️ Every HTML tag starts with which sign? (a) { (b) [ (c) < (d) (
- 31.🏷️ Is <body> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
32.🔗 Where does this link open?
<a href="news.html">Maths fun</a> (a) in the same tab (b) in a new tab - 33.📄 Can HTML on its own run a game loop? (a) No (b) Yes
- 34.True or false: in <img>, src sets how tall it is. (a) False (b) True
-
35.🔠 How many headings are in this code?
<h1>My pets</h1>
<h2>The red kite</h2>
<h4>Rain today</h4>
<h3>Good morning!</h3>
<h2>Good morning!</h2> -
36.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Roses are red<br>Stars shine<br>Rivers flow</p> - 37.Which of these has a closing tag? (a) <meta> (b) <b> (c) <hr> (d) <input>
- 38.🔠 Which tag is the least important heading? (a) <h1> (b) <p> (c) <h6> (d) <h3>
-
39.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>Good morning!</p>
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p> - 40.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) alt (c) height (d) width
Answer key
- 1
- False
- Yes
- Yes
- </h1>
- line 2
- hosts websites online
- <li>
- </u>
- line 3
- 3
- </i>
- 3
- the body
- False
- <li>
- on the browser tab
- fort.jpg
- My best friend
- False
- cake.jpg
- games.html
- href
- False
- 3
- in a new tab
- Yes
- Welcome!
- line 3
- <
- an opening tag
- in the same tab
- No
- False
- 5
- 4
- <b>
- <h6>
- 3
- alt
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids