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 is the odd one out? (a) is where we type code (b) hosts websites online (c) sends pages over the net (d) answers page requests
- 2.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
- 3.True or false: <h1> goes in the head. (a) True (b) False
-
4.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h2>Hello, world!</h2>
<p>Hello, world!</p> - 5.Which of these is true of a web server? (a) shows line numbers (b) answers page requests (c) colours code to help us (d) turns HTML into a page
- 6.🔠 Which heading shows the BIGGEST text: <h5>, <h6>, <h1> or <h4>? (a) <h6> (b) <h1> (c) <h4> (d) <h5>
-
7.🔍 One closing tag is missing. Which one?
<h2>I love mangoes.
<i>Good morning!</i>
<h3>My pets</h3> (a) </h3> (b) </i> (c) </h2> (d) </p> - 8.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) in a big heading (d) on the browser tab
-
9.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="150"> (a) bus.jpg (b) tiger.jpg (c) fort.jpg (d) Our school bus -
10.📝 On how many lines does the browser show this paragraph?
<p>Stars shine<br>Sky is blue</p> - 11.True or false: in <img>, width names the picture file. (a) True (b) False
-
12.💬 How many paragraphs show on the page?
<p>Cricket is fun.</p>
<!-- <p>My pets</p> -->
<!-- <p>My best friend</p> -->
<!-- <p>Fun facts</p> --> - 13.🏷️ Every HTML tag starts with which sign? (a) [ (b) ( (c) < (d) {
-
14.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<h4>Our school trip</h4>
<p>My best friend</p>
<h4>Fun facts</h4>
<p>My best friend</p> - 15.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <head> (c) </html> (d) <!DOCTYPE html>
- 16.Which of these has a closing tag? (a) <hr> (b) <meta> (c) <title> (d) <input>
-
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="250"> (a) dog.jpg (b) width (c) A happy dog (d) The full moon - 18.📄 Where does <title> go: in the head or in the body? (a) in the body (b) in the head
- 19.🔠 Which tag is used for the main title on a page? (a) <br> (b) <p> (c) <h1> (d) <h6>
-
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="100"> (a) width (b) dog.jpg (c) A happy dog (d) The full moon - 21.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h2> (d) <h6>
- 22.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) makes it bold (d) hides the link
- 23.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <br> (c) <ol> (d) <ul>
- 24.🔗 Which tag makes a clickable link? (a) <a> (b) <p> (c) <img> (d) <link>
-
25.📋 How many items does this list show?
<ol>
<li>Litchi</li>
<li>Orange</li>
</ol> - 26.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) address (c) element (d) editor
-
27.🔗 Where does this link open?
<a href="games.html">Maths fun</a> (a) in a new tab (b) in the same tab -
28.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>My pets</p> -->
<p>Rain today</p> (a) My pets (b) My best friend (c) Rain today - 29.🔤 In “HTML”, what does the M stand for? (a) Machine (b) Modern (c) Markup (d) Mouse
- 30.Which of these is a closing tag? (a) <h1> (b) <b> (c) <p> (d) </h1>
- 31.💬 How does an HTML comment end? (a) >> (b) // (c) */ (d) -->
- 32.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
- 33.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h3> or <h2>? (a) <h3> (b) <h2> (c) <h1> (d) <h5>
- 34.Which of these goes in the head? (a) <h1> (b) <table> (c) <title> (d) <ul>
- 35.🌐 Which one stores a website’s files? (a) a web browser (b) a code editor (c) a web server
-
36.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h3>Hello, world!</h3>
<h4>Hello, world!</h4>
<h2>Hello, world!</h2> - 37.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
38.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="100"> - 39.True or false: HTML on its own cannot make bullet lists. (a) True (b) False
-
40.💬 Which text will NOT show on the page?
<!-- <p>Rain today</p> -->
<p>I love mangoes.</p>
<p>The red kite</p> (a) I love mangoes. (b) The red kite (c) Rain today
Answer key
- is where we type code
- Yes
- False
- 2
- answers page requests
- <h1>
- </h2>
- on the browser tab
- bus.jpg
- 2
- False
- 1
- <
- 3
- <!DOCTYPE html>
- <title>
- A happy dog
- in the head
- <h1>
- A happy dog
- <h6>
- opens it in a new tab
- <ol>
- <a>
- 2
- element
- in the same tab
- My pets
- Markup
- </h1>
- -->
- <ul>
- <h1>
- <title>
- a web server
- 4
- an opening tag
- 100
- False
- Rain today
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids