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 tag puts a picture on a page? (a) <pic> (b) <img> (c) <p> (d) <a>
- 2.True or false: HTML on its own can add up two numbers. (a) False (b) True
- 3.🔍 Which is the odd one out? (a) stores a website’s files (b) shows pages from the web (c) answers page requests (d) sends pages over the net
- 4.📄 Can HTML on its own count button clicks? (a) No (b) Yes
-
5.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="300"> - 6.🏷️ Is </h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
7.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Mango</li>
</ul> - 8.🏷️ HTML marks up text using ___. (a) keys (b) wires (c) pixels (d) tags
- 9.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
- 10.💬 How does an HTML comment end? (a) // (b) --> (c) >> (d) */
- 11.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h2> or <h1>? (a) <h6> (b) <h1> (c) <h2> (d) <h4>
-
12.🔗 Where does this link open?
<a href="contact.html" target="_blank">School news</a> (a) in a new tab (b) in the same tab - 13.🔍 Which is the odd one out? (a) has an address bar (b) hosts websites online (c) opens web pages for us (d) shows pages from the web
-
14.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="350"> - 15.📝 What do we need to write HTML? (a) a plain text editor (b) a microphone (c) a paintbrush (d) a printer
-
16.🔗 Where does this link open?
<a href="quiz.html">Take the quiz</a> (a) in a new tab (b) in the same tab -
17.🔍 One closing tag is missing. Which one?
<u>I love mangoes.
<strong>Hello, world!</strong>
<h1>Cricket is fun.</h1> (a) </em> (b) </h1> (c) </u> (d) </strong> -
18.🔗 Where does this link open?
<a href="news.html" target="_blank">About us</a> (a) in the same tab (b) in a new tab -
19.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Good morning!</p>
<p>Hello, world!</p> (a) Hello, world! (b) My pets (c) Good morning! - 20.True or false: <img> goes in the body. (a) True (b) False
- 21.🖼️ Which attribute of <img> is read by screen readers? (a) src (b) alt (c) height (d) width
-
22.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>My best friend</p> -->
<p>Rain today</p> (a) The red kite (b) My best friend (c) Rain today -
23.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Fun facts</p>
<!-- <p>I love mangoes.</p> --> (a) My best friend (b) Fun facts (c) I love mangoes. - 24.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
-
25.🔍 One closing tag is missing. Which one?
<small>My best friend</small>
<p>Hello, world!
<u>My pets</u> (a) </p> (b) </h1> (c) </u> (d) </small> -
26.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="50"> (a) bus.jpg (b) An old fort (c) width (d) Our school bus - 27.True or false: <meta charset="utf-8"> goes in the head. (a) False (b) True
- 28.Which of these is a closing tag? (a) <li> (b) </li> (c) <body> (d) <b>
-
29.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h3>Cricket is fun.</h3>
<h3>The red kite</h3>
<h2>My best friend</h2>
<h2>Rain today</h2> -
30.💬 How many paragraphs show on the page?
<!-- <p>I love mangoes.</p> -->
<!-- <p>Hello, world!</p> -->
<p>Rain today</p> - 31.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
- 32.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
- 33.True or false: a web server colours code to help us. (a) False (b) True
- 34.🌐 Which one is where we type code? (a) a code editor (b) a web server (c) a web browser
-
35.🔗 Where does this link open?
<a href="about.html">Play games</a> (a) in the same tab (b) in a new tab - 36.True or false: HTML on its own cannot keep a high score. (a) False (b) True
- 37.🔢 In a basic web page file, which comes FIRST? (a) </head> (b) </html> (c) </body> (d) <!DOCTYPE html>
-
38.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Jamun</li>
<li>Mango</li>
</ul> (a) bullets (b) numbers - 39.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
- 40.🔢 In a basic web page file, which comes first: “</body>” or “</head>”? (a) </head> (b) </body>
Answer key
- <img>
- False
- shows pages from the web
- No
- 300
- a closing tag
- 2
- tags
- <!--
- -->
- <h1>
- in a new tab
- hosts websites online
- 350
- a plain text editor
- in the same tab
- </u>
- in a new tab
- My pets
- True
- alt
- My best friend
- I love mangoes.
- <ul>
- </p>
- Our school bus
- True
- </li>
- 5
- 1
- href
- <a>
- False
- a code editor
- in the same tab
- True
- <!DOCTYPE html>
- bullets
- in the body
- </head>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids