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 is true of a web browser? (a) colours code to help us (b) shows pages from the web (c) stores a website’s files (d) shows line numbers
-
2.🔍 Which line is missing its closing tag?
line 1: <small>Good morning!</small>
line 2: <b>Rain today</b>
line 3: <p>I love mangoes. (a) line 1 (b) line 2 (c) line 3 -
3.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>I love mangoes.</p>
<!-- <p>Rain today</p> --> (a) Rain today (b) I love mangoes. (c) The red kite - 4.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 5.📄 Can HTML on its own run a game loop? (a) No (b) Yes
- 6.Which of these is an opening tag? (a) <b> (b) </h1> (c) </title> (d) </b>
-
7.📝 How many paragraphs does this code make?
<p>My pets</p>
<h2>Rain today</h2>
<h2>Hello, world!</h2>
<p>Cricket is fun.</p>
<p>My pets</p>
<h2>Cricket is fun.</h2> - 8.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h5> or <h1>? (a) <h1> (b) <h5> (c) <h3> (d) <h4>
-
9.🔍 One closing tag is missing. Which one?
<i>Fun facts
<em>I love mangoes.</em>
<p>Our school trip</p> (a) </em> (b) </i> (c) </p> (d) </h3> - 10.📋 Which list tag is an unordered list? (a) <li> (b) <ol> (c) <ul>
- 11.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h1> or <h3>? (a) <h3> (b) <h1> (c) <h5> (d) <h4>
-
12.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Hello, world!</p>
<h2>Cricket is fun.</h2> - 13.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) attribute (d) editor
- 14.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) src (d) alt
- 15.True or false: <li> has a closing tag. (a) False (b) True
-
16.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>My best friend</p>
<p>My pets</p>
<!-- <p>Good morning!</p> -->
<p>Our school trip</p> -
17.🔍 One closing tag is missing. Which one?
<em>Fun facts</em>
<u>My pets
<i>Our school trip</i> (a) </i> (b) </u> (c) </em> (d) </h2> -
18.💬 Which text will NOT show on the page?
<p>My best friend</p>
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p> (a) The red kite (b) My best friend (c) I love mangoes. - 19.True or false: <table> goes in the head. (a) False (b) True
-
20.📝 How many paragraphs does this code make?
<p>My best friend</p>
<h2>My best friend</h2>
<h2>I love mangoes.</h2> -
21.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Grapes</li>
<li>Guava</li>
<li>Mango</li>
<li>Orange</li>
<li>Banana</li>
</ul> - 22.Which of these is a closing tag? (a) <h1> (b) </h1> (c) <p> (d) <b>
-
23.🔗 Which words do you click on?
<a href="contact.html">Play games</a> (a) Play games (b) About us (c) href (d) contact.html - 24.True or false: HTML on its own cannot make headings. (a) True (b) False
-
25.📝 How many paragraphs does this code make?
<p>I love mangoes.</p>
<h2>I love mangoes.</h2>
<h2>Cricket is fun.</h2>
<h2>Cricket is fun.</h2>
<h2>My best friend</h2>
<h2>Rain today</h2> -
26.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>Hello, world!</p>
<!-- <p>My best friend</p> -->
<p>My pets</p> - 27.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Line (c) Link (d) Language
- 28.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
29.🔠 How many headings are in this code?
<h1>Cricket is fun.</h1>
<p>Good morning!</p>
<h3>Fun facts</h3> - 30.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <meta charset="utf-8"> (c) <title> (d) <img>
- 31.🔠 Which heading shows the SMALLEST text: <h1>, <h4>, <h3> or <h2>? (a) <h3> (b) <h1> (c) <h4> (d) <h2>
-
32.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Good morning!</p>
<!-- <p>I love mangoes.</p> -->
<p>The red kite</p> (a) The red kite (b) Good morning! (c) My pets (d) I love mangoes. - 33.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <h6> (c) <p> (d) <br>
- 34.💾 A web page file usually ends with which extension? (a) .mp3 (b) .png (c) .txt (d) .html
- 35.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
- 36.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h6> or <h1>? (a) <h2> (b) <h6> (c) <h4> (d) <h1>
- 37.🔗 Which attribute holds the address of a link? (a) href (b) src (c) alt (d) id
- 38.💬 How does an HTML comment start? (a) /* (b) <!-- (c) // (d) #
- 39.🏷️ What does a closing tag have that an opening tag does not? (a) a dot . (b) a slash / (c) a hash # (d) a dollar $
- 40.📄 Which part holds everything you see on the page? (a) the doctype (b) the title (c) the body (d) the head
Answer key
- shows pages from the web
- line 3
- Rain today
- in the body
- No
- <b>
- 3
- <h1>
- </i>
- <ul>
- <h5>
- 2
- element
- src
- True
- 4
- </u>
- I love mangoes.
- False
- 1
- 6
- </h1>
- Play games
- False
- 1
- 2
- Language
- Yes
- 2
- <img>
- <h4>
- I love mangoes.
- <h1>
- .html
- <!DOCTYPE html>
- <h1>
- href
- <!--
- a slash /
- the body
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids