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 items does this list show?
<ul>
<li>Litchi</li>
<li>Guava</li>
<li>Jamun</li>
</ul> - 2.🌐 Which one hosts websites online? (a) a web server (b) a web browser (c) a code editor
-
3.🔗 Which words do you click on?
<a href="art.html">Take the quiz</a> (a) art.html (b) Play games (c) Take the quiz (d) href - 4.🏷️ Is </title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
5.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Stars shine<br>Rivers flow<br>Kites fly high</p> - 6.🏷️ What does a closing tag have that an opening tag does not? (a) a hash # (b) a slash / (c) a dot . (d) a dollar $
- 7.Which of these is true of a web server? (a) has an address bar (b) colours code to help us (c) is where we type code (d) answers page requests
- 8.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <style> (c) <ul> (d) <title>
- 9.True or false: <table> goes in the body. (a) True (b) False
-
10.🔍 One closing tag is missing. Which one?
<p>Fun facts</p>
<i>I love mangoes.</i>
<h3>Hello, world! (a) </h3> (b) </em> (c) </p> (d) </i> -
11.💬 How many paragraphs show on the page?
<!-- <p>My pets</p> -->
<!-- <p>The red kite</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>Our school trip</p> -
12.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Try this poha.</p>
</body>
</html> (a) index.html (b) Class 7 Blog (c) Welcome! (d) Try this poha. - 13.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 14.True or false: in <img>, alt names the picture file. (a) True (b) False
- 15.📝 What does <hr> draw? (a) a link (b) a picture (c) a line across the page (d) a table
- 16.🏷️ Which is the closing tag for <h1>? (a) </h1> (b) <h1> (c) <\h1> (d) <h1/>
- 17.Which of these is a closing tag? (a) <p> (b) <h1> (c) <li> (d) </b>
- 18.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <p> (d) <br>
-
19.💬 Which text will NOT show on the page?
<p>The red kite</p>
<p>Fun facts</p>
<p>Good morning!</p>
<!-- <p>I love mangoes.</p> --> (a) Good morning! (b) Fun facts (c) The red kite (d) I love mangoes. - 20.💬 How does an HTML comment end? (a) --> (b) */ (c) // (d) >>
-
21.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="50"> - 22.🏷️ Is </b> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
23.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Hello, world!</p>
<!-- <p>Rain today</p> --> (a) Hello, world! (b) Rain today (c) My best friend - 24.🔢 In a basic web page file, which comes FIRST? (a) <head> (b) <!DOCTYPE html> (c) <body> (d) </body>
- 25.📝 Does <ul> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 26.🖼️ Which attribute of <img> tells which image to load? (a) width (b) alt (c) src (d) height
-
27.🔍 Which line is missing its closing tag?
line 1: <h3>My pets</h3>
line 2: <i>My best friend
line 3: <small>Hello, world!</small> (a) line 3 (b) line 2 (c) line 1 - 28.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
-
29.🔍 One closing tag is missing. Which one?
<em>I love mangoes.
<h2>Hello, world!</h2>
<b>Cricket is fun.</b> (a) </b> (b) </i> (c) </h2> (d) </em> -
30.🖼️ How many pixels wide is the picture drawn?
<img src="kite.png" alt="A red kite" width="250"> -
31.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="dog.jpg" alt="A happy dog" width="250"> (a) The full moon (b) dog.jpg (c) A happy dog (d) width -
32.📋 How many items does this list show?
<ul>
<li>Guava</li>
<li>Orange</li>
<li>Papaya</li>
<li>Mango</li>
</ul> -
33.🔗 Where does this link open?
<a href="art.html" target="_blank">Take the quiz</a> (a) in a new tab (b) in the same tab - 34.🔠 How many heading levels does HTML have? (a) 4 (b) 3 (c) 6 (d) 10
-
35.🔗 Which words do you click on?
<a href="maths.html">Take the quiz</a> (a) maths.html (b) Play games (c) href (d) Take the quiz - 36.💾 A web page file usually ends with which extension? (a) .png (b) .txt (c) .mp3 (d) .html
- 37.🔗 Which tag makes a clickable link? (a) <img> (b) <link> (c) <p> (d) <a>
- 38.🔗 What does target="_blank" do to a link? (a) hides the link (b) opens it in a new tab (c) makes it bold (d) makes it blank
-
39.🔍 One closing tag is missing. Which one?
<u>Good morning!</u>
<h1>Fun facts</h1>
<h2>The red kite (a) </h1> (b) </h2> (c) </u> (d) </em> -
40.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>I like to read.</p>
</body>
</html> (a) Welcome! (b) body (c) I like to read. (d) Class 7 Blog
Answer key
- 3
- a web server
- Take the quiz
- a closing tag
- 4
- a slash /
- answers page requests
- <ul>
- True
- </h3>
- 1
- Class 7 Blog
- has a closing tag
- False
- a line across the page
- </h1>
- </b>
- <h1>
- I love mangoes.
- -->
- 50
- a closing tag
- Rain today
- <!DOCTYPE html>
- has a closing tag
- src
- line 2
- in the head
- </em>
- 250
- A happy dog
- 4
- in a new tab
- 6
- Take the quiz
- .html
- <a>
- opens it in a new tab
- </h2>
- Welcome!
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids