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 of these has a closing tag? (a) <meta> (b) <input> (c) <title> (d) <img>
- 2.🔍 Which is the odd one out? (a) saves our .html files (b) opens web pages for us (c) shows line numbers (d) is where we type code
- 3.🔗 Which tag makes a clickable link? (a) <img> (b) <p> (c) <link> (d) <a>
- 4.📋 Which list shows the steps of a recipe best? (a) <br> (b) <ul> (c) <ol> (d) <hr>
-
5.📝 On how many lines does the browser show this paragraph?
<p>Birds sing<br>Kites fly high<br>Roses are red<br>Stars shine</p> - 6.📛 In <a href="x.html">, what is href? (a) an element name (b) an attribute (c) a closing tag (d) a comment
-
7.🔗 Which address opens when you click this link?
<a href="quiz.html">Art corner</a> (a) games.html (b) quiz.html (c) about.html (d) Art corner - 8.📄 What is the first line of an HTML5 page? (a) <html> (b) <!DOCTYPE html> (c) <head> (d) <body>
- 9.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
- 10.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h2> or <h1>? (a) <h3> (b) <h2> (c) <h4> (d) <h1>
- 11.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a slash / (d) a hash #
- 12.🔡 Are HTML tag names usually written in small letters? (a) No (b) Yes
- 13.🖼️ Which attribute of <img> shows if the image fails? (a) src (b) width (c) height (d) alt
- 14.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 15.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h3> or <h6>? (a) <h5> (b) <h6> (c) <h3> (d) <h1>
-
16.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>Good morning!</p> -->
<!-- <p>Rain today</p> -->
<!-- <p>Hello, world!</p> --> - 17.📋 Which list tag is an unordered list? (a) <li> (b) <ul> (c) <ol>
-
18.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="250"> - 19.🔍 Which is the odd one out? (a) has an address bar (b) saves our .html files (c) is where we type code (d) colours code to help us
-
20.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>I love mangoes.</p>
<p>I love mangoes.</p>
<h2>Cricket is fun.</h2>
<p>Rain today</p> -
21.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Our school trip</p>
<p>Cricket is fun.</p>
<h2>Good morning!</h2> -
22.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Fun facts</p>
<!-- <p>Good morning!</p> --> - 23.📝 What does <hr> draw? (a) a link (b) a table (c) a picture (d) a line across the page
- 24.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h5>? (a) <h3> (b) <h4> (c) <h2> (d) <h5>
-
25.📋 What number does the browser show next to “Guava”?
<ol start="6">
<li>Grapes</li>
<li>Banana</li>
<li>Guava</li>
<li>Orange</li>
<li>Jamun</li>
<li>Mango</li>
</ol> -
26.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<!-- <p>Our school trip</p> --> (a) Cricket is fun. (b) I love mangoes. (c) Our school trip - 27.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h4>? (a) <h5> (b) <h1> (c) <h4> (d) <h3>
-
28.🔗 Which words do you click on?
<a href="https://example.com">About us</a> (a) https://example.com (b) href (c) Contact us (d) About us -
29.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<p>The red kite</p>
<!-- <p>My best friend</p> --> (a) I love mangoes. (b) My best friend (c) The red kite - 30.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
- 31.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
- 32.Which of these is true of a web server? (a) shows pages from the web (b) stores a website’s files (c) saves our .html files (d) is where we type code
- 33.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h3> or <h2>? (a) <h2> (b) <h4> (c) <h3> (d) <h6>
- 34.💬 Does the browser show comments on the page? (a) Yes (b) No
- 35.True or false: in <img>, height sets how tall it is. (a) True (b) False
-
36.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h3>The red kite</h3>
<h2>Hello, world!</h2>
<p>Good morning!</p>
<h2>Our school trip</h2> - 37.🖼️ Which attribute of <img> describes the picture? (a) width (b) alt (c) src (d) height
- 38.True or false: <ul> is an unordered list. (a) False (b) True
-
39.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Mango</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Orange</li>
<li>Guava</li>
<li>Banana</li>
</ol> - 40.🔍 Which is the odd one out? (a) has an address bar (b) opens web pages for us (c) shows pages from the web (d) answers page requests
Answer key
- <title>
- opens web pages for us
- <a>
- <ol>
- 4
- an attribute
- quiz.html
- <!DOCTYPE html>
- to leave notes
- <h1>
- a slash /
- Yes
- alt
- in the head
- <h6>
- 1
- <ul>
- 250
- has an address bar
- 4
- 2
- 1
- a line across the page
- <h5>
- 8
- Our school trip
- <h1>
- About us
- My best friend
- False
- Yes
- stores a website’s files
- <h2>
- No
- True
- 4
- alt
- True
- 2
- answers page requests
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids