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) hosts websites online (b) shows pages from the web (c) turns HTML into a page (d) has an address bar
- 2.🏷️ Which is the closing tag for <i>? (a) </i> (b) <i> (c) <i/> (d) <\i>
-
3.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="fort.jpg" alt="An old fort" width="50"> (a) An old fort (b) A tiger asleep (c) fort.jpg (d) width -
4.🔗 Where does this link open?
<a href="news.html">Play games</a> (a) in a new tab (b) in the same tab - 5.Which of these is an empty tag? (a) <hr> (b) <p> (c) <ul> (d) <h1>
- 6.🖼️ Does <img> need a closing tag? (a) Yes (b) No
-
7.💬 Which text will NOT show on the page?
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p>
<p>Hello, world!</p> (a) Hello, world! (b) I love mangoes. (c) Rain today - 8.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
-
9.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>I love mangoes.</p>
<p>My best friend</p> -
10.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="150"> -
11.🔍 One closing tag is missing. Which one?
<strong>Good morning!</strong>
<p>Rain today</p>
<h1>The red kite (a) </small> (b) </strong> (c) </p> (d) </h1> - 12.🔠 Which heading shows the BIGGEST text: <h6>, <h5>, <h4> or <h1>? (a) <h5> (b) <h1> (c) <h4> (d) <h6>
- 13.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
- 14.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h5> or <h1>? (a) <h4> (b) <h2> (c) <h1> (d) <h5>
- 15.💬 How does an HTML comment start? (a) <!-- (b) /* (c) // (d) #
-
16.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>Good morning!</p>
<p>Rain today</p>
<p>Rain today</p>
<p>Fun facts</p>
<p>Cricket is fun.</p> - 17.📋 Which list suits a shopping list in any order? (a) <br> (b) <ol> (c) <hr> (d) <ul>
- 18.Which of these is true of a code editor? (a) opens web pages for us (b) is where we type code (c) shows pages from the web (d) sends pages over the net
-
19.🔍 Which line is missing its closing tag?
line 1: <h3>Cricket is fun.</h3>
line 2: <b>Rain today</b>
line 3: <h1>The red kite (a) line 2 (b) line 3 (c) line 1 - 20.True or false: <img> goes in the head. (a) True (b) False
-
21.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Space Facts</title>
</head>
<body>
<h1>Match report</h1>
<p>We won by 5 runs.</p>
</body>
</html> (a) body (b) We won by 5 runs. (c) Space Facts (d) Match report - 22.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 23.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) makes it blank (d) hides the link
-
24.📋 What number does the browser show next to “Guava”?
<ol start="4">
<li>Mango</li>
<li>Guava</li>
<li>Litchi</li>
<li>Grapes</li>
<li>Orange</li>
<li>Jamun</li>
</ol> - 25.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
26.💬 How many paragraphs show on the page?
<!-- <p>My best friend</p> -->
<!-- <p>Fun facts</p> -->
<p>Our school trip</p>
<!-- <p>My pets</p> --> - 27.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <html> (c) </head> (d) </html>
-
28.💬 Which text will NOT show on the page?
<p>Our school trip</p>
<p>My pets</p>
<p>Hello, world!</p>
<!-- <p>Fun facts</p> --> (a) Hello, world! (b) Our school trip (c) Fun facts (d) My pets -
29.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Birds sing</p> -
30.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Jamun</li>
<li>Guava</li>
</ol> -
31.🔍 One closing tag is missing. Which one?
<i>My best friend</i>
<em>Rain today
<h1>Good morning!</h1> (a) </em> (b) </h1> (c) </p> (d) </i> - 32.🔍 Which is the odd one out? (a) sends pages over the net (b) answers page requests (c) shows pages from the web (d) hosts websites online
-
33.📋 Does this list show bullets or numbers?
<ol>
<li>Guava</li>
<li>Grapes</li>
</ol> (a) bullets (b) numbers - 34.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
- 35.🔍 Which is the odd one out? (a) opens web pages for us (b) has an address bar (c) turns HTML into a page (d) saves our .html files
-
36.📋 Does this list show bullets or numbers?
<ol>
<li>Jamun</li>
<li>Grapes</li>
</ol> (a) numbers (b) bullets - 37.📄 Can HTML on its own add pictures to a page? (a) Yes (b) No
- 38.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <li> (d) <p>
-
39.🔍 One closing tag is missing. Which one?
<i>Good morning!</i>
<h3>My pets
<em>Cricket is fun.</em> (a) </em> (b) </b> (c) </i> (d) </h3> - 40.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h5> or <h1>? (a) <h4> (b) <h5> (c) <h6> (d) <h1>
Answer key
- hosts websites online
- </i>
- An old fort
- in the same tab
- <hr>
- No
- I love mangoes.
- a code editor
- 1
- 150
- </h1>
- <h1>
- a web server
- <h1>
- <!--
- 6
- <ul>
- is where we type code
- line 3
- False
- Match report
- in the body
- opens it in a new tab
- 5
- Yes
- 1
- </html>
- Fun facts
- 2
- 3
- </em>
- shows pages from the web
- numbers
- False
- saves our .html files
- numbers
- Yes
- <li>
- </h3>
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids