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: HTML on its own can keep a high score. (a) False (b) True
- 2.True or false: <li> is an empty tag. (a) False (b) True
- 3.🔠 Which heading shows the SMALLEST text: <h6>, <h3>, <h5> or <h4>? (a) <h3> (b) <h5> (c) <h4> (d) <h6>
- 4.Which of these is an empty tag? (a) <p> (b) <ul> (c) <meta> (d) <title>
-
5.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="100"> - 6.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <hr> (d) <br>
- 7.🔠 Which heading shows the BIGGEST text: <h6>, <h4>, <h2> or <h1>? (a) <h4> (b) <h6> (c) <h2> (d) <h1>
- 8.🔠 Are headings shown in bold by default? (a) No (b) Yes
-
9.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="50"> (a) Our school bus (b) fort.jpg (c) tiger.jpg (d) bus.jpg -
10.🔗 Where does this link open?
<a href="maths.html">School news</a> (a) in the same tab (b) in a new tab - 11.Which of these is true of a web server? (a) has an address bar (b) is where we type code (c) shows line numbers (d) hosts websites online
-
12.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) All about me (b) body (c) Class 7 Blog (d) Thanks for visiting. -
13.🔗 Which address opens when you click this link?
<a href="contact.html">Take the quiz</a> (a) Take the quiz (b) https://example.com (c) contact.html (d) maths.html -
14.📝 How many paragraphs does this code make?
<p>Our school trip</p>
<p>Hello, world!</p>
<h2>Good morning!</h2> -
15.📝 On how many lines does the browser show this paragraph?
<p>Kites fly high<br>Sky is blue<br>Roses are red</p> -
16.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="350"> (a) kite.png (b) A red kite (c) cake.jpg (d) map.png -
17.🔍 One closing tag is missing. Which one?
<h2>The red kite</h2>
<em>My best friend</em>
<i>Rain today (a) </em> (b) </p> (c) </h2> (d) </i> - 18.📛 In <a href="x.html">, what is href? (a) an element name (b) a comment (c) a closing tag (d) an attribute
-
19.🔍 Which line is missing its closing tag?
line 1: <h2>Good morning!</h2>
line 2: <strong>The red kite</strong>
line 3: <p>Rain today (a) line 2 (b) line 3 (c) line 1 - 20.True or false: <img> is an empty tag. (a) True (b) False
- 21.True or false: <input> has a closing tag. (a) False (b) True
-
22.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Banana</li>
<li>Litchi</li>
</ol> (a) bullets (b) numbers - 23.True or false: <style> goes in the body. (a) False (b) True
- 24.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h2> or <h6>? (a) <h2> (b) <h1> (c) <h4> (d) <h6>
-
25.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>Rain today</p> -->
<p>Hello, world!</p>
<p>Good morning!</p> (a) Cricket is fun. (b) Hello, world! (c) Good morning! (d) Rain today - 26.🔠 Which heading shows the BIGGEST text: <h5>, <h1>, <h3> or <h2>? (a) <h2> (b) <h1> (c) <h5> (d) <h3>
- 27.True or false: in <img>, src shows if the image fails. (a) True (b) False
-
28.🔍 One closing tag is missing. Which one?
<i>Rain today
<small>Fun facts</small>
<em>The red kite</em> (a) </h1> (b) </em> (c) </i> (d) </small> -
29.🔗 Which words do you click on?
<a href="maths.html">Maths fun</a> (a) Art corner (b) href (c) maths.html (d) Maths fun - 30.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
-
31.📋 How many items does this list show?
<ol>
<li>Guava</li>
<li>Orange</li>
<li>Mango</li>
<li>Banana</li>
<li>Litchi</li>
</ol> -
32.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>My best friend</p> -->
<p>Our school trip</p> (a) Our school trip (b) My best friend (c) I love mangoes. - 33.Which of these is true of a web browser? (a) saves our .html files (b) hosts websites online (c) stores a website’s files (d) turns HTML into a page
-
34.📝 How many paragraphs does this code make?
<p>Rain today</p>
<h2>Good morning!</h2>
<p>Cricket is fun.</p>
<h2>Hello, world!</h2>
<p>The red kite</p>
<p>Hello, world!</p> -
35.🔠 How many headings are in this code?
<h1>My best friend</h1>
<p>My pets</p>
<h4>Hello, world!</h4> -
36.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="400"> - 37.🏷️ Is <body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 38.🖼️ Does <img> need a closing tag? (a) Yes (b) No
- 39.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
- 40.📄 Where does <img> go: in the head or in the body? (a) in the body (b) in the head
Answer key
- False
- False
- <h6>
- <meta>
- 100
- <ol>
- <h1>
- Yes
- bus.jpg
- in the same tab
- hosts websites online
- All about me
- contact.html
- 2
- 3
- kite.png
- </i>
- an attribute
- line 3
- True
- False
- numbers
- False
- <h6>
- Rain today
- <h1>
- False
- </i>
- Maths fun
- 6
- 5
- My best friend
- turns HTML into a page
- 4
- 2
- 400
- an opening tag
- No
- in the head
- in the body
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids