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) <br> (b) <meta> (c) <hr> (d) <ul>
-
2.📝 How many paragraphs does this code make?
<p>Hello, world!</p>
<p>Fun facts</p>
<p>Our school trip</p> - 3.True or false: <ol> is an unordered list. (a) False (b) True
-
4.🔗 Which words do you click on?
<a href="quiz.html">Take the quiz</a> (a) href (b) Play games (c) Take the quiz (d) quiz.html - 5.🌍 Which program shows a web page to us? (a) a paint program (b) a calculator (c) a web browser (d) a music player
- 6.Which of these goes in the head? (a) <img> (b) <style> (c) <ul> (d) <h1>
- 7.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
-
8.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="400"> (a) cake.jpg (b) map.png (c) A red kite (d) kite.png - 9.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
-
10.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Jamun</li>
<li>Banana</li>
</ul> -
11.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>Cricket is fun.</p>
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> --> (a) Cricket is fun. (b) Rain today (c) I love mangoes. (d) Hello, world! - 12.🔍 Which is the odd one out? (a) has an address bar (b) turns HTML into a page (c) shows pages from the web (d) shows line numbers
-
13.🔗 Which address opens when you click this link?
<a href="https://example.com">Play games</a> (a) art.html (b) Play games (c) maths.html (d) https://example.com -
14.💬 How many paragraphs show on the page?
<!-- <p>The red kite</p> -->
<p>I love mangoes.</p>
<p>Our school trip</p> - 15.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the body (b) in the head
-
16.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>My pets</p>
<p>Cricket is fun.</p>
<h2>My pets</h2>
<p>My pets</p> - 17.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it blank (c) hides the link (d) makes it bold
- 18.🔢 In a basic web page file, which comes first: “</body>” or “<body>”? (a) <body> (b) </body>
-
19.💬 How many paragraphs show on the page?
<!-- <p>Good morning!</p> -->
<!-- <p>Fun facts</p> -->
<p>Our school trip</p>
<p>My best friend</p>
<p>My pets</p> - 20.🧱 HTML gives a web page its ___. (a) sound (b) colours (c) structure (d) speed
-
21.📝 How many paragraphs does this code make?
<p>Fun facts</p>
<p>Our school trip</p>
<h2>My best friend</h2>
<h2>Fun facts</h2>
<p>Fun facts</p>
<h2>My pets</h2> - 22.True or false: <title> goes in the body. (a) False (b) True
-
23.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<p>Cricket is fun.</p>
<p>Fun facts</p>
<!-- <p>My best friend</p> --> -
24.🔗 Which address opens when you click this link?
<a href="quiz.html">Contact us</a> (a) Contact us (b) quiz.html (c) about.html (d) games.html - 25.📝 Does <ul> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
-
26.📋 What number does the browser show next to “Grapes”?
<ol>
<li>Jamun</li>
<li>Litchi</li>
<li>Grapes</li>
</ol> - 27.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
-
28.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="100"> (a) An old fort (b) kite.png (c) fort.jpg (d) tiger.jpg -
29.🔍 Which line is missing its closing tag?
line 1: <em>Hello, world!</em>
line 2: <b>My best friend</b>
line 3: <strong>I love mangoes. (a) line 1 (b) line 3 (c) line 2 -
30.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) I like to read. (b) index.html (c) Class 7 Blog (d) Welcome! -
31.💬 How many paragraphs show on the page?
<p>Rain today</p>
<p>My best friend</p>
<!-- <p>My pets</p> --> - 32.True or false: in <img>, alt sets how tall it is. (a) True (b) False
- 33.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
34.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="250"> (a) kite.png (b) A red kite (c) map.png (d) cake.jpg - 35.True or false: <meta> is an empty tag. (a) False (b) True
- 36.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h2> or <h4>? (a) <h4> (b) <h5> (c) <h2> (d) <h1>
- 37.Which of these is true of a web browser? (a) hosts websites online (b) colours code to help us (c) saves our .html files (d) has an address bar
- 38.🌐 Which one has an address bar? (a) a code editor (b) a web server (c) a web browser
- 39.True or false: in <img>, width sets how wide it is. (a) False (b) True
-
40.📋 What number does the browser show next to “Orange”?
<ol start="8">
<li>Litchi</li>
<li>Orange</li>
<li>Jamun</li>
<li>Grapes</li>
</ol>
Answer key
- <ul>
- 3
- False
- Take the quiz
- a web browser
- <style>
- <ul>
- kite.png
- on the browser tab
- 3
- Hello, world!
- shows line numbers
- https://example.com
- 2
- in the head
- 2
- opens it in a new tab
- <body>
- 3
- structure
- 3
- False
- 3
- quiz.html
- has a closing tag
- 3
- href
- fort.jpg
- line 3
- Class 7 Blog
- 2
- False
- an opening tag
- kite.png
- True
- <h5>
- has an address bar
- a web browser
- True
- 9
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids