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 one has an address bar? (a) a web browser (b) a web server (c) a code editor
-
2.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Hello, world!</h2>
<p>Rain today</p>
<p>I love mangoes.</p>
<p>My best friend</p>
<p>I love mangoes.</p> - 3.🔍 Which is the odd one out? (a) stores a website’s files (b) answers page requests (c) opens web pages for us (d) sends pages over the net
-
4.🔍 One closing tag is missing. Which one?
<b>Our school trip
<u>Hello, world!</u>
<small>Fun facts</small> (a) </small> (b) </u> (c) </em> (d) </b> - 5.Which of these is a closing tag? (a) <b> (b) <h1> (c) <li> (d) </body>
- 6.💬 How does an HTML comment end? (a) --> (b) >> (c) // (d) */
-
7.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<h2>I love mangoes.</h2>
<p>Rain today</p> - 8.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
9.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="150"> (a) cake.jpg (b) map.png (c) kite.png (d) A red kite - 10.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Modern (c) Mouse (d) Markup
- 11.💾 A web page file usually ends with which extension? (a) .mp3 (b) .html (c) .png (d) .txt
- 12.True or false: HTML on its own cannot keep a high score. (a) False (b) True
- 13.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 14.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h1>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
- 15.🏷️ Which is the closing tag for <strong>? (a) </strong> (b) <strong> (c) <strong/> (d) <\strong>
- 16.Which of these goes in the head? (a) <table> (b) <ul> (c) <h1> (d) <style>
- 17.📛 In <a href="x.html">, what is href? (a) an attribute (b) a closing tag (c) a comment (d) an element name
- 18.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <ol> (d) <br>
- 19.📋 Which list tag is an ordered list? (a) <ul> (b) <ol> (c) <li>
-
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="100"> (a) fort.jpg (b) A tiger asleep (c) width (d) An old fort - 21.🔢 In a basic web page file, which comes first: “</head>” or “<html>”? (a) </head> (b) <html>
-
22.💬 How many paragraphs show on the page?
<!-- <p>Hello, world!</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p>
<p>The red kite</p>
<!-- <p>Rain today</p> --> - 23.🖼️ Which attribute of <img> describes the picture? (a) width (b) height (c) alt (d) src
-
24.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>Rain today</p>
<p>Hello, world!</p> (a) My pets (b) Hello, world! (c) Rain today - 25.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
26.🔗 Which words do you click on?
<a href="quiz.html">Art corner</a> (a) href (b) Art corner (c) School news (d) quiz.html -
27.💬 Which text will NOT show on the page?
<!-- <p>Hello, world!</p> -->
<p>Fun facts</p>
<p>Rain today</p> (a) Fun facts (b) Rain today (c) Hello, world! - 28.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Language (c) Link (d) Line
- 29.🔢 In a basic web page file, which comes LAST? (a) </body> (b) <head> (c) </html> (d) </head>
- 30.🌐 Which one saves our .html files? (a) a web browser (b) a web server (c) a code editor
-
31.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>My best friend</p>
<h4>Good morning!</h4>
<h3>Hello, world!</h3>
<h4>Fun facts</h4> - 32.📄 Can HTML on its own run a game loop? (a) No (b) Yes
- 33.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
- 34.True or false: HTML on its own can make a form. (a) True (b) False
- 35.True or false: a code editor hosts websites online. (a) True (b) False
-
36.📋 What number does the browser show next to “Litchi”?
<ol>
<li>Banana</li>
<li>Jamun</li>
<li>Mango</li>
<li>Litchi</li>
<li>Guava</li>
</ol> - 37.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
-
38.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="150"> - 39.📝 What does <hr> draw? (a) a table (b) a picture (c) a line across the page (d) a link
- 40.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </body> (c) <head> (d) <body>
Answer key
- a web browser
- 5
- opens web pages for us
- </b>
- </body>
- -->
- 2
- No
- kite.png
- Markup
- .html
- True
- an empty tag
- <h1>
- </strong>
- <style>
- an attribute
- <ol>
- <ol>
- An old fort
- <html>
- 2
- alt
- My pets
- has a closing tag
- Art corner
- Hello, world!
- Language
- </html>
- a code editor
- 4
- No
- <h6>
- True
- False
- 4
- <ul>
- 150
- a line across the page
- <!DOCTYPE html>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids