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>Our school trip</p> -->
<p>My best friend</p>
<p>Hello, world!</p>
<p>I love mangoes.</p> -
2.📋 What number does the browser show next to “Banana”?
<ol>
<li>Grapes</li>
<li>Orange</li>
<li>Guava</li>
<li>Banana</li>
<li>Mango</li>
</ol> - 3.🌐 Which one is where we type code? (a) a web browser (b) a web server (c) a code editor
- 4.Which of these goes in the head? (a) <table> (b) <style> (c) <h1> (d) <ul>
-
5.🔍 One closing tag is missing. Which one?
<p>Good morning!</p>
<u>Cricket is fun.</u>
<b>My pets (a) </h2> (b) </p> (c) </b> (d) </u> - 6.🔍 Which is the odd one out? (a) has an address bar (b) shows line numbers (c) opens web pages for us (d) turns HTML into a page
- 7.📄 Which part holds everything you see on the page? (a) the doctype (b) the head (c) the title (d) the body
- 8.Which of these is an empty tag? (a) <ul> (b) <b> (c) <img> (d) <p>
-
9.🔗 Which address opens when you click this link?
<a href="games.html">Visit the site</a> (a) about.html (b) contact.html (c) Visit the site (d) games.html - 10.📄 Can HTML on its own show paragraphs? (a) Yes (b) No
- 11.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h4> or <h2>? (a) <h4> (b) <h1> (c) <h5> (d) <h2>
- 12.Which of these goes in the body? (a) <style> (b) <title> (c) <meta charset="utf-8"> (d) <h1>
- 13.🏷️ Which is the closing tag for <strong>? (a) <strong/> (b) </strong> (c) <strong> (d) <\strong>
- 14.📛 In <a href="x.html">, what is href? (a) a comment (b) an element name (c) a closing tag (d) an attribute
-
15.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>My best friend</p> -->
<p>Our school trip</p> (a) My best friend (b) Cricket is fun. (c) Our school trip - 16.🔠 How many heading levels does HTML have? (a) 10 (b) 4 (c) 3 (d) 6
- 17.🔠 Which heading shows the SMALLEST text: <h2>, <h4>, <h3> or <h1>? (a) <h3> (b) <h4> (c) <h1> (d) <h2>
- 18.Which of these is an opening tag? (a) </li> (b) </title> (c) </h1> (d) <body>
- 19.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 20.Which of these is an empty tag? (a) <ul> (b) <meta> (c) <li> (d) <title>
-
21.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="100"> (a) An old fort (b) bus.jpg (c) width (d) Our school bus - 22.Which of these is a closing tag? (a) <p> (b) <b> (c) <body> (d) </title>
- 23.Which of these is an opening tag? (a) </body> (b) <h1> (c) </title> (d) </p>
-
24.🔍 Which line is missing its closing tag?
line 1: <p>Good morning!</p>
line 2: <b>Cricket is fun.</b>
line 3: <small>My pets (a) line 2 (b) line 1 (c) line 3 - 25.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h1>? (a) <h2> (b) <h4> (c) <h1> (d) <h5>
- 26.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
-
27.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Good morning!</p>
<p>Our school trip</p> - 28.🖼️ Which tag puts a picture on a page? (a) <a> (b) <p> (c) <img> (d) <pic>
- 29.True or false: <title> goes in the head. (a) False (b) True
-
30.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Guava</li>
<li>Papaya</li>
</ol> (a) numbers (b) bullets - 31.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <li> (c) <ol>
-
32.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>The red kite</p> -->
<!-- <p>My best friend</p> --> -
33.📄 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>I like to read.</p>
</body>
</html> (a) Class 7 Blog (b) My drawings (c) index.html (d) I like to read. - 34.🖼️ Which attribute of <img> names the picture file? (a) src (b) width (c) height (d) alt
- 35.💬 Does the browser show comments on the page? (a) Yes (b) No
- 36.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h1> or <h2>? (a) <h3> (b) <h1> (c) <h2> (d) <h6>
- 37.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <a> (d) <p>
-
38.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Banana</li>
</ol> (a) bullets (b) numbers - 39.True or false: <hr> is an empty tag. (a) True (b) False
-
40.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Cricket Club</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Here is my best one.</p>
</body>
</html> (a) Cricket Club (b) Welcome! (c) Here is my best one. (d) body
Answer key
- 3
- 4
- a code editor
- <style>
- </b>
- shows line numbers
- the body
- <img>
- games.html
- Yes
- <h5>
- <h1>
- </strong>
- an attribute
- My best friend
- 6
- <h4>
- <body>
- in the head
- <meta>
- Our school bus
- </title>
- <h1>
- line 3
- <h1>
- in the body
- 2
- <img>
- True
- numbers
- <li>
- 1
- Class 7 Blog
- src
- No
- <h1>
- <a>
- numbers
- True
- Welcome!
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids