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 <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 2.Which of these has a closing tag? (a) <h1> (b) <hr> (c) <meta> (d) <img>
-
3.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>Rain today</p>
<!-- <p>Good morning!</p> --> -
4.🔗 Which words do you click on?
<a href="news.html">About us</a> (a) news.html (b) Contact us (c) href (d) About us - 5.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
-
6.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Birds sing</p> -
7.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Birds sing</p> -
8.🔍 Which line is missing its closing tag?
line 1: <u>Cricket is fun.</u>
line 2: <i>I love mangoes.</i>
line 3: <small>My pets (a) line 1 (b) line 3 (c) line 2 -
9.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="300"> (a) tiger.jpg (b) Our school bus (c) fort.jpg (d) bus.jpg - 10.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) width (c) height (d) alt
- 11.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) ( (d) {
- 12.True or false: <ol> is an unordered list. (a) False (b) True
- 13.💬 How does an HTML comment end? (a) // (b) */ (c) >> (d) -->
- 14.True or false: in <img>, src names the picture file. (a) True (b) False
- 15.🏷️ Is </title> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
16.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Cricket is fun.</p>
<!-- <p>My pets</p> -->
<p>Hello, world!</p> (a) The red kite (b) Cricket is fun. (c) Hello, world! (d) My pets -
17.📋 How many items does this list show?
<ol>
<li>Banana</li>
<li>Orange</li>
<li>Guava</li>
</ol> - 18.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
- 19.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em> (c) </em> (d) <em/>
-
20.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Guava</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Orange</li>
</ol> - 21.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
22.🔗 Which address opens when you click this link?
<a href="news.html">Visit the site</a> (a) Visit the site (b) news.html (c) games.html (d) quiz.html - 23.Which of these is true of a web browser? (a) shows line numbers (b) answers page requests (c) opens web pages for us (d) saves our .html files
-
24.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> -->
<!-- <p>My best friend</p> --> - 25.🔍 Which is the odd one out? (a) saves our .html files (b) colours code to help us (c) turns HTML into a page (d) is where we type code
- 26.💬 Why do coders write comments? (a) to add colour (b) to show pictures (c) to leave notes (d) to make links
- 27.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
28.🔍 Which line is missing its closing tag?
line 1: <h1>The red kite
line 2: <i>Fun facts</i>
line 3: <small>Rain today</small> (a) line 2 (b) line 3 (c) line 1 -
29.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Our school trip</p>
<p>My pets</p>
<h2>I love mangoes.</h2> - 30.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
- 31.True or false: a code editor answers page requests. (a) True (b) False
- 32.Which of these is a closing tag? (a) <title> (b) <b> (c) </li> (d) <p>
- 33.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
-
34.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="100"> -
35.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="300"> (a) A happy dog (b) bus.jpg (c) moon.png (d) dog.jpg - 36.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
37.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Rain today</p> -->
<!-- <p>Fun facts</p> --> -
38.🖼️ Which picture file does the browser load?
<img src="map.png" alt="Map of India" width="150"> (a) map.png (b) Map of India (c) dog.jpg (d) cake.jpg - 39.🔤 In “HTML”, what do the letters HT stand for? (a) HyperText (b) Hot Tags (c) Home Text (d) High Tech
-
40.🔗 Which words do you click on?
<a href="contact.html">Take the quiz</a> (a) Take the quiz (b) contact.html (c) href (d) Play games
Answer key
- an empty tag
- <h1>
- 2
- About us
- <a href="about.html">
- 2
- 2
- line 3
- bus.jpg
- alt
- <
- False
- -->
- True
- a closing tag
- My pets
- 3
- Yes
- </em>
- 5
- a closing tag
- news.html
- opens web pages for us
- 1
- turns HTML into a page
- to leave notes
- an opening tag
- line 1
- 2
- Yes
- False
- </li>
- in the body
- 100
- dog.jpg
- an opening tag
- 1
- map.png
- HyperText
- Take the quiz
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids