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) 4 (b) 10 (c) 6 (d) 3
- 2.🌐 Which one shows pages from the web? (a) a web server (b) a code editor (c) a web browser
- 3.🔗 What does HyperText mean? (a) text with links (b) secret text (c) very big text (d) text in colour
- 4.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
-
5.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Mars is red.</p>
</body>
</html> (a) Class 7 Blog (b) Mars is red. (c) All about me (d) index.html -
6.📋 What number does the browser show next to “Jamun”?
<ol start="5">
<li>Litchi</li>
<li>Mango</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Banana</li>
</ol> -
7.🔗 Where does this link open?
<a href="maths.html">Play games</a> (a) in a new tab (b) in the same tab - 8.Which of these has a closing tag? (a) <meta> (b) <img> (c) <li> (d) <input>
- 9.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 10.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h6>? (a) <h4> (b) <h6> (c) <h1> (d) <h2>
- 11.💬 How does an HTML comment start? (a) // (b) <!-- (c) /* (d) #
- 12.Which of these is true of a web server? (a) shows line numbers (b) answers page requests (c) shows pages from the web (d) opens web pages for us
-
13.🖼️ Which picture file does the browser load?
<img src="fort.jpg" alt="An old fort" width="50"> (a) tiger.jpg (b) kite.png (c) An old fort (d) fort.jpg - 14.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 10 (d) 3
- 15.Which of these has a closing tag? (a) <br> (b) <img> (c) <meta> (d) <h1>
- 16.True or false: in <img>, height shows if the image fails. (a) False (b) True
- 17.🌐 Which one shows line numbers? (a) a web server (b) a web browser (c) a code editor
- 18.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 19.True or false: <meta> has a closing tag. (a) True (b) False
-
20.🖼️ Which picture file does the browser load?
<img src="dog.jpg" alt="A happy dog" width="50"> (a) bus.jpg (b) A happy dog (c) dog.jpg (d) moon.png -
21.🔠 How many headings are in this code?
<h1>Hello, world!</h1>
<p>Our school trip</p>
<p>Rain today</p>
<p>Hello, world!</p>
<h2>Rain today</h2> -
22.💬 Which text will NOT show on the page?
<p>My pets</p>
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> --> (a) Cricket is fun. (b) Rain today (c) My pets -
23.📋 How many items does this list show?
<ol>
<li>Orange</li>
<li>Guava</li>
</ol> - 24.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an attribute (c) an element name (d) a comment
- 25.🏷️ Which is the closing tag for <i>? (a) <i> (b) <i/> (c) <\i> (d) </i>
-
26.📝 How many paragraphs does this code make?
<p>The red kite</p>
<p>I love mangoes.</p>
<p>Hello, world!</p>
<h2>Fun facts</h2>
<h2>Hello, world!</h2>
<p>Good morning!</p> - 27.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) src (d) width
- 28.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h3> or <h1>? (a) <h1> (b) <h2> (c) <h5> (d) <h3>
-
29.🔍 Which line is missing its closing tag?
line 1: <h1>Fun facts
line 2: <h3>Good morning!</h3>
line 3: <i>Hello, world!</i> (a) line 3 (b) line 2 (c) line 1 - 30.🌐 Which one is where we type code? (a) a web browser (b) a code editor (c) a web server
- 31.Which of these is an opening tag? (a) </b> (b) </title> (c) <title> (d) </h1>
-
32.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="150"> (a) A red kite (b) kite.png (c) map.png (d) cake.jpg - 33.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 34.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) src (d) alt
- 35.True or false: HTML on its own cannot add pictures to a page. (a) False (b) True
- 36.True or false: <li> is an empty tag. (a) False (b) True
-
37.🔗 Which address opens when you click this link?
<a href="games.html">Contact us</a> (a) Contact us (b) games.html (c) about.html (d) contact.html - 38.True or false: in <img>, height tells which image to load. (a) True (b) False
- 39.📝 Does <input> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 40.🏷️ Is <p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
Answer key
- 6
- a web browser
- text with links
- in the body
- Class 7 Blog
- 8
- in the same tab
- <li>
- an opening tag
- <h1>
- <!--
- answers page requests
- fort.jpg
- 1
- <h1>
- False
- a code editor
- Yes
- False
- dog.jpg
- 2
- Rain today
- 2
- an attribute
- </i>
- 4
- src
- <h1>
- line 1
- a code editor
- <title>
- kite.png
- an empty tag
- src
- False
- False
- games.html
- False
- an empty tag
- an opening tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids