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.True or false: <img> has a closing tag. (a) False (b) True
-
2.🔍 One closing tag is missing. Which one?
<h3>Fun facts</h3>
<h2>The red kite
<em>Good morning!</em> (a) </h2> (b) </b> (c) </h3> (d) </em> -
3.💬 How many paragraphs show on the page?
<p>My pets</p>
<p>Hello, world!</p>
<p>The red kite</p>
<!-- <p>My best friend</p> --> - 4.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <!DOCTYPE html> (c) </head> (d) </body>
- 5.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
-
6.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Litchi</li>
<li>Banana</li>
<li>Orange</li>
<li>Grapes</li>
<li>Jamun</li>
</ul> -
7.🖼️ How many pixels wide is the picture drawn?
<img src="map.png" alt="Map of India" width="250"> -
8.🔗 Which words do you click on?
<a href="quiz.html">About us</a> (a) quiz.html (b) href (c) About us (d) Contact us -
9.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<h2>Hello, world!</h2>
<h4>My pets</h4>
<h3>My pets</h3>
<p>My pets</p> -
10.🔗 Which words do you click on?
<a href="https://example.com">Art corner</a> (a) Art corner (b) School news (c) href (d) https://example.com - 11.📝 Does <title> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 12.🌐 Which one saves our .html files? (a) a code editor (b) a web server (c) a web browser
-
13.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Planets</h1>
<p>Mars is red.</p>
</body>
</html> (a) Planets (b) index.html (c) Class 7 Blog (d) Mars is red. - 14.💬 Does the browser show comments on the page? (a) No (b) Yes
- 15.True or false: in <img>, src sets how wide it is. (a) False (b) True
- 16.True or false: <ul> is an unordered list. (a) True (b) False
-
17.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Papaya</li>
<li>Guava</li>
<li>Orange</li>
<li>Jamun</li>
</ul> -
18.📋 How many items does this list show?
<ul>
<li>Papaya</li>
<li>Litchi</li>
<li>Guava</li>
</ul> - 19.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes a list (d) makes text bold
- 20.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 21.🖼️ Does <img> need a closing tag? (a) No (b) Yes
- 22.True or false: a web server stores a website’s files. (a) False (b) True
- 23.True or false: <li> is an unordered list. (a) False (b) True
- 24.🧱 HTML gives a web page its ___. (a) sound (b) structure (c) speed (d) colours
-
25.📋 What number does the browser show next to “Mango”?
<ol>
<li>Jamun</li>
<li>Mango</li>
<li>Orange</li>
</ol> - 26.True or false: HTML on its own can make headings. (a) True (b) False
-
27.🔠 How many headings are in this code?
<h1>The red kite</h1>
<h4>Hello, world!</h4>
<p>I love mangoes.</p> - 28.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h3> or <h6>? (a) <h3> (b) <h2> (c) <h6> (d) <h1>
-
29.🔗 Which address opens when you click this link?
<a href="contact.html">Art corner</a> (a) Art corner (b) maths.html (c) https://example.com (d) contact.html - 30.🔍 Which is the odd one out? (a) shows pages from the web (b) colours code to help us (c) has an address bar (d) opens web pages for us
-
31.🖼️ Which picture file does the browser load?
<img src="tiger.jpg" alt="A tiger asleep" width="100"> (a) tiger.jpg (b) kite.png (c) A tiger asleep (d) map.png - 32.📝 What does <hr> draw? (a) a picture (b) a link (c) a table (d) a line across the page
- 33.🌐 Which one sends pages over the net? (a) a web browser (b) a web server (c) a code editor
- 34.🖼️ Which attribute of <img> sets how tall it is? (a) src (b) alt (c) width (d) height
-
35.🔗 Which words do you click on?
<a href="contact.html">Art corner</a> (a) School news (b) href (c) Art corner (d) contact.html - 36.True or false: in <img>, alt shows if the image fails. (a) False (b) True
-
37.🔍 Which line is missing its closing tag?
line 1: <u>Rain today
line 2: <small>My pets</small>
line 3: <strong>Cricket is fun.</strong> (a) line 3 (b) line 2 (c) line 1 - 38.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h1> or <h4>? (a) <h1> (b) <h2> (c) <h4> (d) <h5>
-
39.🔗 Which words do you click on?
<a href="quiz.html">Art corner</a> (a) quiz.html (b) href (c) Art corner (d) School news - 40.True or false: HTML on its own cannot pick a random number. (a) True (b) False
Answer key
- False
- </h2>
- 3
- <!DOCTYPE html>
- opens it in a new tab
- 6
- 250
- About us
- 4
- Art corner
- has a closing tag
- a code editor
- Class 7 Blog
- No
- False
- True
- 5
- 3
- starts a new line
- an opening tag
- No
- True
- False
- structure
- 2
- True
- 2
- <h6>
- contact.html
- colours code to help us
- tiger.jpg
- a line across the page
- a web server
- height
- Art corner
- True
- line 1
- <h5>
- Art corner
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids