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.🔠 How many heading levels does HTML have? (a) 3 (b) 4 (c) 10 (d) 6
-
2.📋 What number does the browser show next to “Jamun”?
<ol>
<li>Grapes</li>
<li>Jamun</li>
<li>Orange</li>
<li>Papaya</li>
</ol> - 3.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
- 4.📝 Does <p> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
5.📋 What number does the browser show next to “Orange”?
<ol start="3">
<li>Mango</li>
<li>Banana</li>
<li>Orange</li>
</ol> -
6.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>Cricket is fun.</p>
<h3>I love mangoes.</h3>
<p>My best friend</p> -
7.📋 What number does the browser show next to “Banana”?
<ol start="6">
<li>Litchi</li>
<li>Mango</li>
<li>Banana</li>
</ol> -
8.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> --> -
9.📝 How many paragraphs does this code make?
<p>Good morning!</p>
<p>Fun facts</p>
<p>My best friend</p>
<h2>Cricket is fun.</h2>
<h2>Good morning!</h2> -
10.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>My pets</p>
<p>Good morning!</p> - 11.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h2> or <h1>? (a) <h1> (b) <h2> (c) <h3> (d) <h6>
-
12.🔗 Where does this link open?
<a href="games.html">Play games</a> (a) in the same tab (b) in a new tab - 13.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h2> or <h5>? (a) <h5> (b) <h2> (c) <h4> (d) <h6>
-
14.🔠 How many headings are in this code?
<h1>My pets</h1>
<h2>My pets</h2>
<h2>Hello, world!</h2> - 15.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
-
16.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Our school trip</p>
<h4>Rain today</h4> -
17.🔍 One closing tag is missing. Which one?
<b>The red kite</b>
<i>Hello, world!
<h1>My pets</h1> (a) </u> (b) </h1> (c) </b> (d) </i> - 18.📄 What is the first line of an HTML5 page? (a) <!DOCTYPE html> (b) <html> (c) <body> (d) <head>
-
19.🔗 Where does this link open?
<a href="art.html">School news</a> (a) in the same tab (b) in a new tab -
20.📝 How many paragraphs does this code make?
<p>My best friend</p>
<p>The red kite</p>
<h2>Cricket is fun.</h2> - 21.💬 Does the browser show comments on the page? (a) Yes (b) No
-
22.🔗 Which words do you click on?
<a href="news.html">Play games</a> (a) Play games (b) About us (c) news.html (d) href - 23.📄 Where does <h1> go: in the head or in the body? (a) in the body (b) in the head
-
24.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Our school trip</p>
<p>Good morning!</p>
<p>My best friend</p> - 25.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
- 26.📋 Which list shows the steps of a recipe best? (a) <ol> (b) <ul> (c) <hr> (d) <br>
-
27.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Planets</h1>
<p>I like to read.</p>
</body>
</html> (a) Planets (b) I like to read. (c) Class 7 Blog (d) index.html - 28.🔍 Which is the odd one out? (a) shows line numbers (b) colours code to help us (c) is where we type code (d) shows pages from the web
- 29.True or false: <meta> has a closing tag. (a) False (b) True
- 30.🏷️ Which is the closing tag for <i>? (a) <i/> (b) <\i> (c) </i> (d) <i>
-
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="moon.png" alt="The full moon" width="50"> (a) width (b) moon.png (c) Our school bus (d) The full moon - 32.🏷️ Which is the closing tag for <h2>? (a) <\h2> (b) <h2/> (c) <h2> (d) </h2>
-
33.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Papaya</li>
<li>Guava</li>
<li>Mango</li>
<li>Jamun</li>
<li>Orange</li>
</ol> - 34.True or false: a code editor sends pages over the net. (a) True (b) False
- 35.🔗 Which tag makes a clickable link? (a) <link> (b) <img> (c) <a> (d) <p>
- 36.True or false: a web browser saves our .html files. (a) False (b) True
- 37.True or false: <br> has a closing tag. (a) False (b) True
- 38.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
- 39.True or false: HTML on its own cannot make links to pages. (a) False (b) True
- 40.🧱 HTML gives a web page its ___. (a) structure (b) colours (c) speed (d) sound
Answer key
- 6
- 2
- <img>
- has a closing tag
- 5
- 2
- 8
- 1
- 3
- 3
- <h6>
- in the same tab
- <h6>
- 3
- -->
- 2
- </i>
- <!DOCTYPE html>
- in the same tab
- 2
- No
- Play games
- in the body
- 3
- <ul>
- <ol>
- Class 7 Blog
- shows pages from the web
- False
- </i>
- The full moon
- </h2>
- 6
- False
- <a>
- False
- False
- a code editor
- False
- structure
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids