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.🔗 Where does this link open?
<a href="contact.html" target="_blank">Play games</a> (a) in a new tab (b) in the same tab - 2.📄 Can HTML on its own make links to pages? (a) Yes (b) No
-
3.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Cricket is fun.</p> -->
<p>Hello, world!</p>
<p>My best friend</p> - 4.Which of these is an opening tag? (a) </li> (b) </h1> (c) <h1> (d) </p>
- 5.💬 How does an HTML comment end? (a) // (b) >> (c) --> (d) */
- 6.Which of these has a closing tag? (a) <b> (b) <hr> (c) <br> (d) <input>
- 7.Which of these has a closing tag? (a) <meta> (b) <ul> (c) <input> (d) <img>
-
8.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>I love mangoes.</p>
<p>My pets</p>
<p>My best friend</p>
<!-- <p>Hello, world!</p> --> -
9.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="300"> (a) fort.jpg (b) tiger.jpg (c) kite.png (d) An old fort - 10.True or false: a web browser opens web pages for us. (a) False (b) True
- 11.🏷️ Which is the closing tag for <h1>? (a) <h1> (b) <h1/> (c) </h1> (d) <\h1>
- 12.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
-
13.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="200"> (a) width (b) Birthday cake (c) Map of India (d) map.png -
14.🖼️ How many pixels wide is the picture drawn?
<img src="moon.png" alt="The full moon" width="350"> -
15.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="300"> (a) dog.jpg (b) bus.jpg (c) A happy dog (d) moon.png -
16.🔗 Which words do you click on?
<a href="news.html">Maths fun</a> (a) Art corner (b) href (c) news.html (d) Maths fun - 17.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ul> (c) <ol>
-
18.🔗 Which address opens when you click this link?
<a href="contact.html">Maths fun</a> (a) https://example.com (b) contact.html (c) maths.html (d) Maths fun - 19.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 20.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
-
21.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Cricket is fun.</p>
<p>The red kite</p>
<p>Our school trip</p> (a) Cricket is fun. (b) The red kite (c) Our school trip (d) I love mangoes. - 22.True or false: <ul> goes in the body. (a) False (b) True
- 23.🔍 Which is the odd one out? (a) shows pages from the web (b) opens web pages for us (c) shows line numbers (d) turns HTML into a page
- 24.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <hr> (d) <ol>
-
25.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>My pets</p>
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p> (a) Our school trip (b) Cricket is fun. (c) My pets (d) I love mangoes. - 26.Which of these goes in the body? (a) <title> (b) <link rel="stylesheet"> (c) <h1> (d) <meta charset="utf-8">
- 27.🏷️ Every HTML tag starts with which sign? (a) < (b) ( (c) { (d) [
- 28.True or false: <ul> goes in the head. (a) True (b) False
- 29.True or false: <ol> lists steps in order. (a) False (b) True
- 30.True or false: in <img>, src is read by screen readers. (a) False (b) True
- 31.🔤 In “HTML”, what do the letters HT stand for? (a) High Tech (b) HyperText (c) Home Text (d) Hot Tags
- 32.True or false: <li> is an unordered list. (a) False (b) True
- 33.📄 Can HTML on its own make headings? (a) Yes (b) No
-
34.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h3>Hello, world!</h3>
<p>Cricket is fun.</p>
<p>My pets</p> - 35.True or false: <img> has a closing tag. (a) True (b) False
- 36.🖼️ Which attribute of <img> names the picture file? (a) alt (b) src (c) width (d) height
- 37.📄 Where does <title> go: in the head or in the body? (a) in the head (b) in the body
- 38.🏷️ Which is the closing tag for <strong>? (a) </strong> (b) <strong/> (c) <strong> (d) <\strong>
- 39.📄 Can HTML on its own keep a high score? (a) No (b) Yes
-
40.🔗 Which words do you click on?
<a href="news.html">Contact us</a> (a) Visit the site (b) href (c) news.html (d) Contact us
Answer key
- in a new tab
- Yes
- 3
- <h1>
- -->
- <b>
- <ul>
- 4
- fort.jpg
- True
- </h1>
- <h1>
- Map of India
- 350
- dog.jpg
- Maths fun
- <ol>
- contact.html
- in the body
- in the head
- I love mangoes.
- True
- shows line numbers
- <ol>
- Cricket is fun.
- <h1>
- <
- False
- True
- False
- HyperText
- False
- Yes
- 2
- False
- src
- in the head
- </strong>
- No
- Contact us
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids