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 picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) kite.png (b) map.png (c) tiger.jpg (d) A tiger asleep - 2.Which of these is an opening tag? (a) </li> (b) </b> (c) </body> (d) <body>
-
3.🔠 How many headings are in this code?
<h1>Rain today</h1>
<h2>Cricket is fun.</h2>
<p>Cricket is fun.</p>
<p>The red kite</p>
<h2>My pets</h2> -
4.🔗 Which words do you click on?
<a href="contact.html">Take the quiz</a> (a) Take the quiz (b) href (c) contact.html (d) Play games - 5.📄 What is the first line of an HTML5 page? (a) <body> (b) <!DOCTYPE html> (c) <head> (d) <html>
- 6.💬 How does an HTML comment end? (a) // (b) >> (c) --> (d) */
- 7.🏷️ Which is the closing tag for <small>? (a) </small> (b) <small> (c) <small/> (d) <\small>
-
8.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>My best friend</p> -->
<!-- <p>Rain today</p> -->
<p>Cricket is fun.</p> - 9.True or false: HTML on its own can count button clicks. (a) True (b) False
- 10.💬 Does the browser show comments on the page? (a) No (b) Yes
- 11.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <p> (c) <title> (d) <style>
-
12.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>The red kite</p>
<p>I love mangoes.</p> -
13.🔗 Which words do you click on?
<a href="https://example.com">Play games</a> (a) Play games (b) https://example.com (c) href (d) About us - 14.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
15.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>Fun facts</p>
<p>Rain today</p>
<p>Rain today</p> - 16.True or false: HTML on its own cannot make links to pages. (a) False (b) True
-
17.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Rain today</p>
<p>Cricket is fun.</p>
<p>I love mangoes.</p> (a) Hello, world! (b) I love mangoes. (c) Cricket is fun. (d) Rain today -
18.🔗 Which words do you click on?
<a href="news.html">Contact us</a> (a) Visit the site (b) Contact us (c) href (d) news.html -
19.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) Play games (b) About us (c) contact.html (d) href - 20.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 21.🌐 Which one saves our .html files? (a) a web server (b) a code editor (c) a web browser
- 22.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 23.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a src="about.html">
- 24.📋 Which list tag lists steps in order? (a) <li> (b) <ul> (c) <ol>
-
25.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue<br>Birds sing<br>Rivers flow<br>Roses are red</p> -
26.📋 Does this list show bullets or numbers?
<ul>
<li>Grapes</li>
<li>Guava</li>
<li>Orange</li>
</ul> (a) numbers (b) bullets - 27.🏷️ Is <b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 28.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h2> or <h3>? (a) <h1> (b) <h5> (c) <h3> (d) <h2>
-
29.🔗 Where does this link open?
<a href="quiz.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab - 30.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
- 31.True or false: <ul> lists steps in order. (a) True (b) False
-
32.🔗 Where does this link open?
<a href="games.html">Take the quiz</a> (a) in the same tab (b) in a new tab -
33.🔗 Which words do you click on?
<a href="news.html">Play games</a> (a) href (b) news.html (c) About us (d) Play games -
34.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h3>Rain today</h3>
<p>Good morning!</p> - 35.Which of these is an empty tag? (a) <h1> (b) <p> (c) <img> (d) <b>
-
36.📋 Does this list show bullets or numbers?
<ul>
<li>Orange</li>
<li>Banana</li>
</ul> (a) bullets (b) numbers -
37.🔍 One closing tag is missing. Which one?
<strong>The red kite</strong>
<h1>I love mangoes.</h1>
<h2>Cricket is fun. (a) </i> (b) </strong> (c) </h2> (d) </h1> - 38.Which of these is an opening tag? (a) <title> (b) </body> (c) </b> (d) </title>
- 39.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
-
40.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>Rain today</p>
<!-- <p>Hello, world!</p> --> (a) Rain today (b) Hello, world! (c) I love mangoes.
Answer key
- tiger.jpg
- <body>
- 3
- Take the quiz
- <!DOCTYPE html>
- -->
- </small>
- 2
- False
- No
- <p>
- 1
- Play games
- Yes
- 1
- False
- Hello, world!
- Contact us
- Play games
- a closing tag
- a code editor
- in the body
- <a href="about.html">
- <ol>
- 5
- bullets
- an opening tag
- <h5>
- in a new tab
- <ol>
- False
- in the same tab
- Play games
- 2
- <img>
- bullets
- </h2>
- <title>
- Yes
- Hello, world!
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids