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.📝 Does <input> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
2.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<p>The red kite</p>
<p>Fun facts</p>
<p>My pets</p>
<h2>Fun facts</h2> - 3.True or false: HTML on its own can pick a random number. (a) False (b) True
- 4.Which of these is an empty tag? (a) <h1> (b) <li> (c) <ul> (d) <hr>
-
5.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="200"> (a) The full moon (b) Our school bus (c) moon.png (d) width - 6.True or false: <h1> is an empty tag. (a) True (b) False
- 7.🌐 Which one opens web pages for us? (a) a code editor (b) a web browser (c) a web server
-
8.🔍 Which line is missing its closing tag?
line 1: <p>Good morning!
line 2: <strong>The red kite</strong>
line 3: <small>Hello, world!</small> (a) line 2 (b) line 1 (c) line 3 - 9.True or false: in <img>, src shows if the image fails. (a) True (b) False
-
10.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Guava</li>
<li>Orange</li>
<li>Mango</li>
<li>Jamun</li>
</ol> - 11.🔗 Which attribute holds the address of a link? (a) id (b) src (c) alt (d) href
- 12.🔠 Which heading shows the BIGGEST text: <h3>, <h6>, <h2> or <h1>? (a) <h6> (b) <h1> (c) <h3> (d) <h2>
- 13.🏷️ What does a closing tag have that an opening tag does not? (a) a slash / (b) a dollar $ (c) a dot . (d) a hash #
-
14.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing<br>Stars shine</p> -
15.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h4>My pets</h4>
<h4>My best friend</h4>
<p>Fun facts</p> - 16.True or false: a code editor shows line numbers. (a) False (b) True
- 17.📋 Which list tag is an unordered list? (a) <ul> (b) <ol> (c) <li>
- 18.True or false: HTML on its own cannot run a game loop. (a) True (b) False
- 19.📄 Where does the text of <title> appear? (a) in a big heading (b) nowhere (c) on the browser tab (d) at the bottom
-
20.🔗 Which address opens when you click this link?
<a href="maths.html">Take the quiz</a> (a) art.html (b) maths.html (c) news.html (d) Take the quiz - 21.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) src (d) width
- 22.Which of these is an empty tag? (a) <ul> (b) <title> (c) <img> (d) <b>
- 23.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to make it bigger (c) to describe the image (d) to colour it
-
24.🖼️ Which picture file does the browser load?
<img src="moon.png" alt="The full moon" width="300"> (a) moon.png (b) fort.jpg (c) bus.jpg (d) The full moon - 25.True or false: HTML on its own cannot count button clicks. (a) True (b) False
- 26.Which of these goes in the body? (a) <img> (b) <title> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
- 27.🏷️ Every HTML tag starts with which sign? (a) { (b) < (c) [ (d) (
-
28.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>My pets</p>
<p>Fun facts</p>
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> --> - 29.💬 Why do coders write comments? (a) to add colour (b) to make links (c) to leave notes (d) to show pictures
-
30.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Fun facts</p> -->
<!-- <p>My best friend</p> -->
<p>The red kite</p>
<p>Cricket is fun.</p> - 31.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h1> or <h4>? (a) <h5> (b) <h1> (c) <h3> (d) <h4>
- 32.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 33.🔗 Which code links to about.html? (a) <link about.html> (b) <a src="about.html"> (c) <a href="about.html"> (d) <a alt="about.html">
- 34.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 35.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 36.🔠 Which heading shows the BIGGEST text: <h3>, <h1>, <h5> or <h2>? (a) <h3> (b) <h5> (c) <h1> (d) <h2>
- 37.💬 Does the browser show comments on the page? (a) Yes (b) No
- 38.Which of these goes in the head? (a) <a> (b) <title> (c) <h1> (d) <p>
-
39.🔍 One closing tag is missing. Which one?
<h3>Rain today
<small>My best friend</small>
<em>Hello, world!</em> (a) </i> (b) </em> (c) </h3> (d) </small> - 40.True or false: a web browser sends pages over the net. (a) True (b) False
Answer key
- an empty tag
- 4
- False
- <hr>
- The full moon
- False
- a web browser
- line 1
- False
- 5
- href
- <h1>
- a slash /
- 3
- 3
- True
- <ul>
- True
- on the browser tab
- maths.html
- src
- <img>
- to describe the image
- moon.png
- True
- <img>
- <
- 4
- to leave notes
- 2
- <h1>
- Yes
- <a href="about.html">
- a closing tag
- a closing tag
- <h1>
- No
- <title>
- </h3>
- False
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids