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 paragraphs show on the page?
<p>Good morning!</p>
<p>My pets</p>
<p>Our school trip</p>
<!-- <p>I love mangoes.</p> -->
<p>Rain today</p> - 2.🌐 Which one sends pages over the net? (a) a web server (b) a code editor (c) a web browser
- 3.📄 Where does the text of <title> appear? (a) nowhere (b) on the browser tab (c) in a big heading (d) at the bottom
- 4.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
- 5.🔢 In a basic web page file, which comes first: “</body>” or “<!DOCTYPE html>”? (a) </body> (b) <!DOCTYPE html>
-
6.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p> (a) Hello, world! (b) Our school trip (c) I love mangoes. -
7.🔗 Where does this link open?
<a href="games.html">Visit the site</a> (a) in the same tab (b) in a new tab - 8.True or false: <ol> is one item of a list. (a) False (b) True
-
9.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Art Gallery</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) All about me (c) body (d) Art Gallery - 10.🔠 How many <h1> headings should a page usually have? (a) 10 (b) 6 (c) 1 (d) 3
- 11.Which of these goes in the head? (a) <table> (b) <style> (c) <p> (d) <a>
-
12.📋 Does this list show bullets or numbers?
<ul>
<li>Guava</li>
<li>Jamun</li>
<li>Litchi</li>
</ul> (a) numbers (b) bullets -
13.🔗 Where does this link open?
<a href="news.html">Contact us</a> (a) in a new tab (b) in the same tab - 14.True or false: HTML on its own cannot add up two numbers. (a) False (b) True
- 15.Which of these is an opening tag? (a) </p> (b) </body> (c) </title> (d) <p>
- 16.True or false: <ol> is an unordered list. (a) False (b) True
-
17.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="map.png" alt="Map of India" width="150"> (a) Birthday cake (b) width (c) Map of India (d) map.png - 18.🧩 An opening tag + content + a closing tag together make an ___. (a) attribute (b) element (c) address (d) editor
-
19.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My pets</p>
<h3>Fun facts</h3> - 20.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
- 21.Which of these goes in the body? (a) <img> (b) <title> (c) <meta charset="utf-8"> (d) <link rel="stylesheet">
-
22.🔍 Which line is missing its closing tag?
line 1: <p>The red kite</p>
line 2: <em>Hello, world!
line 3: <h3>Rain today</h3> (a) line 3 (b) line 2 (c) line 1 - 23.📝 What does <br> do? (a) adds a picture (b) makes a list (c) makes text bold (d) starts a new line
- 24.🔍 Which is the odd one out? (a) colours code to help us (b) is where we type code (c) turns HTML into a page (d) saves our .html files
- 25.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h4> or <h1>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
-
26.💬 Which text will NOT show on the page?
<p>Rain today</p>
<p>I love mangoes.</p>
<!-- <p>Good morning!</p> -->
<p>Hello, world!</p> (a) Hello, world! (b) I love mangoes. (c) Good morning! (d) Rain today - 27.🔠 Which heading shows the BIGGEST text: <h2>, <h6>, <h4> or <h3>? (a) <h6> (b) <h4> (c) <h2> (d) <h3>
- 28.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) alt (c) width (d) height
- 29.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
-
30.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="150"> - 31.True or false: <br> is an empty tag. (a) True (b) False
- 32.🏷️ Which is the closing tag for <b>? (a) </b> (b) <b/> (c) <b> (d) <\b>
- 33.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
- 34.📋 Which list tag is an unordered list? (a) <ul> (b) <li> (c) <ol>
- 35.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h2> or <h5>? (a) <h5> (b) <h2> (c) <h1> (d) <h4>
-
36.🖼️ How many pixels wide is the picture drawn?
<img src="tiger.jpg" alt="A tiger asleep" width="250"> -
37.🔠 How many headings are in this code?
<h1>My pets</h1>
<h3>My best friend</h3>
<p>Good morning!</p>
<p>Hello, world!</p>
<h3>Cricket is fun.</h3> - 38.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 39.🔍 Which is the odd one out? (a) is where we type code (b) opens web pages for us (c) has an address bar (d) shows pages from the web
-
40.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>My drawings</h1>
<p>Mars is red.</p>
</body>
</html> (a) index.html (b) My drawings (c) Mars is red. (d) Class 7 Blog
Answer key
- 4
- a web server
- on the browser tab
- <a>
- <!DOCTYPE html>
- I love mangoes.
- in the same tab
- False
- All about me
- 1
- <style>
- bullets
- in the same tab
- True
- <p>
- False
- Map of India
- element
- 2
- <ul>
- <img>
- line 2
- starts a new line
- turns HTML into a page
- <h5>
- Good morning!
- <h2>
- width
- No
- 150
- True
- </b>
- <h1>
- <ul>
- <h1>
- 250
- 3
- an opening tag
- is where we type code
- Class 7 Blog
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids