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.📋 Does this list show bullets or numbers?
<ol>
<li>Grapes</li>
<li>Guava</li>
<li>Jamun</li>
</ol> (a) numbers (b) bullets - 2.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 10 (c) 3 (d) 6
-
3.💬 Which text will NOT show on the page?
<p>Rain today</p>
<!-- <p>Good morning!</p> -->
<p>Our school trip</p> (a) Our school trip (b) Good morning! (c) Rain today -
4.🔗 Where does this link open?
<a href="news.html" target="_blank">School news</a> (a) in the same tab (b) in a new tab -
5.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Hello, world!</p>
<p>The red kite</p>
<!-- <p>My best friend</p> -->
<!-- <p>My pets</p> --> -
6.📋 What number does the browser show next to “Papaya”?
<ol start="2">
<li>Orange</li>
<li>Grapes</li>
<li>Banana</li>
<li>Jamun</li>
<li>Litchi</li>
<li>Papaya</li>
</ol> -
7.🔠 How many headings are in this code?
<h1>Rain today</h1>
<p>My best friend</p>
<p>Good morning!</p>
<p>Good morning!</p>
<h3>My pets</h3> -
8.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Rain today</p>
<!-- <p>I love mangoes.</p> --> (a) Fun facts (b) Rain today (c) I love mangoes. - 9.🔗 Which attribute holds the address of a link? (a) href (b) src (c) id (d) alt
-
10.🔍 One closing tag is missing. Which one?
<b>The red kite
<i>My pets</i>
<em>I love mangoes.</em> (a) </i> (b) </em> (c) </b> (d) </p> - 11.Which of these goes in the head? (a) <img> (b) <p> (c) <link rel="stylesheet"> (d) <ul>
- 12.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h3> or <h6>? (a) <h4> (b) <h6> (c) <h5> (d) <h3>
- 13.🏷️ Every HTML tag starts with which sign? (a) [ (b) < (c) { (d) (
- 14.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h5> or <h4>? (a) <h4> (b) <h5> (c) <h3> (d) <h1>
-
15.🔍 Which line is missing its closing tag?
line 1: <u>Rain today</u>
line 2: <i>Fun facts</i>
line 3: <b>I love mangoes. (a) line 3 (b) line 2 (c) line 1 -
16.🔗 Which words do you click on?
<a href="games.html">Visit the site</a> (a) Maths fun (b) href (c) Visit the site (d) games.html - 17.Which of these is true of a web browser? (a) is where we type code (b) has an address bar (c) answers page requests (d) shows line numbers
-
18.🔍 One closing tag is missing. Which one?
<h2>Hello, world!
<h1>My pets</h1>
<i>Our school trip</i> (a) </h2> (b) </em> (c) </i> (d) </h1> - 19.🔗 What does target="_blank" do to a link? (a) makes it bold (b) makes it blank (c) opens it in a new tab (d) hides the link
- 20.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 21.Which of these is a closing tag? (a) <body> (b) <b> (c) </h1> (d) <title>
- 22.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 23.🌐 Which one shows line numbers? (a) a code editor (b) a web browser (c) a web server
- 24.True or false: <ul> lists steps in order. (a) True (b) False
-
25.📄 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) index.html (b) Mars is red. (c) Class 7 Blog (d) Planets -
26.🔠 How many headings are in this code?
<h1>I love mangoes.</h1>
<p>Hello, world!</p>
<p>My pets</p> - 27.🧩 An opening tag + content + a closing tag together make an ___. (a) editor (b) attribute (c) address (d) element
- 28.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) </head> (c) </body> (d) <head>
- 29.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h3> or <h4>? (a) <h4> (b) <h3> (c) <h2> (d) <h5>
-
30.🖼️ How many pixels wide is the picture drawn?
<img src="bus.jpg" alt="Our school bus" width="100"> - 31.Which of these is an empty tag? (a) <p> (b) <ul> (c) <title> (d) <input>
- 32.📄 Where does <h1> go: in the head or in the body? (a) in the head (b) in the body
- 33.📄 Where does <p> go: in the head or in the body? (a) in the body (b) in the head
- 34.Which of these goes in the head? (a) <img> (b) <meta charset="utf-8"> (c) <table> (d) <a>
-
35.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Hello, world!</p> -->
<p>My pets</p>
<p>I love mangoes.</p> (a) The red kite (b) I love mangoes. (c) My pets (d) Hello, world! - 36.🔠 Which heading shows the BIGGEST text: <h3>, <h2>, <h6> or <h5>? (a) <h3> (b) <h5> (c) <h2> (d) <h6>
-
37.🔠 How many headings are in this code?
<h1>Good morning!</h1>
<p>Fun facts</p>
<h4>Hello, world!</h4> - 38.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h5>? (a) <h2> (b) <h4> (c) <h3> (d) <h5>
-
39.💬 How many paragraphs show on the page?
<p>The red kite</p>
<!-- <p>Our school trip</p> -->
<!-- <p>My best friend</p> --> - 40.🔠 Which heading shows the BIGGEST text: <h2>, <h3>, <h4> or <h1>? (a) <h4> (b) <h2> (c) <h3> (d) <h1>
Answer key
- numbers
- 1
- Good morning!
- in a new tab
- 3
- 7
- 2
- I love mangoes.
- href
- </b>
- <link rel="stylesheet">
- <h6>
- <
- <h5>
- line 3
- Visit the site
- has an address bar
- </h2>
- opens it in a new tab
- a closing tag
- </h1>
- Yes
- a code editor
- False
- Class 7 Blog
- 1
- element
- <!DOCTYPE html>
- <h2>
- 100
- <input>
- in the body
- in the body
- <meta charset="utf-8">
- Hello, world!
- <h2>
- 2
- <h2>
- 1
- <h1>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids