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.Which of these is a closing tag? (a) <li> (b) <h1> (c) </h1> (d) <b>
-
2.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>My Hobbies</title>
</head>
<body>
<h1>Match report</h1>
<p>Try this poha.</p>
</body>
</html> (a) Match report (b) index.html (c) My Hobbies (d) Try this poha. - 3.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <h1> (c) <p> (d) <br>
-
4.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<p>Good morning!</p>
<p>The red kite</p>
<!-- <p>Our school trip</p> --> (a) Good morning! (b) Our school trip (c) Fun facts (d) The red kite -
5.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Guava</li>
</ol> (a) bullets (b) numbers -
6.🔍 One closing tag is missing. Which one?
<strong>Fun facts</strong>
<i>Hello, world!
<p>Rain today</p> (a) </strong> (b) </i> (c) </p> (d) </em> - 7.📝 Does <title> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
-
8.🔗 Which address opens when you click this link?
<a href="about.html">About us</a> (a) contact.html (b) https://example.com (c) About us (d) about.html - 9.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 6 (d) 4
- 10.🔗 Which attribute holds the address of a link? (a) src (b) alt (c) id (d) href
-
11.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="bus.jpg" alt="Our school bus" width="400"> (a) An old fort (b) Our school bus (c) bus.jpg (d) width - 12.True or false: in <img>, height sets how tall it is. (a) True (b) False
- 13.True or false: <ul> goes inside ul or ol. (a) False (b) True
- 14.True or false: HTML on its own cannot show paragraphs. (a) False (b) True
- 15.True or false: in <img>, height shows if the image fails. (a) False (b) True
- 16.📋 Which list tag goes inside ul or ol? (a) <ul> (b) <ol> (c) <li>
-
17.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>Match report</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Match report (b) body (c) Riya’s Recipes (d) Thanks for visiting. -
18.📋 How many items does this list show?
<ul>
<li>Mango</li>
<li>Guava</li>
</ul> -
19.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>Cricket is fun.</p>
<p>I love mangoes.</p> - 20.True or false: <title> goes in the head. (a) False (b) True
-
21.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>The red kite</p>
<h2>Fun facts</h2>
<p>Cricket is fun.</p>
<p>Good morning!</p> - 22.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h3> or <h1>? (a) <h4> (b) <h3> (c) <h6> (d) <h1>
- 23.🔠 Which heading shows the BIGGEST text: <h1>, <h6>, <h3> or <h4>? (a) <h6> (b) <h1> (c) <h4> (d) <h3>
- 24.🌐 Which one has an address bar? (a) a code editor (b) a web browser (c) a web server
-
25.🖼️ How many pixels wide is the picture drawn?
<img src="dog.jpg" alt="A happy dog" width="200"> - 26.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h4> or <h3>? (a) <h4> (b) <h2> (c) <h3> (d) <h6>
-
27.📝 How many paragraphs does this code make?
<p>My pets</p>
<p>Hello, world!</p>
<h2>My best friend</h2>
<p>Cricket is fun.</p>
<h2>My best friend</h2> - 28.Which of these is true of a web browser? (a) is where we type code (b) sends pages over the net (c) shows line numbers (d) opens web pages for us
- 29.Which of these goes in the head? (a) <link rel="stylesheet"> (b) <h1> (c) <ul> (d) <a>
-
30.🔗 Which words do you click on?
<a href="https://example.com">Take the quiz</a> (a) https://example.com (b) href (c) Take the quiz (d) Play games -
31.💬 Which text will NOT show on the page?
<!-- <p>My best friend</p> -->
<p>Hello, world!</p>
<p>My pets</p> (a) My pets (b) My best friend (c) Hello, world! - 32.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
-
33.💬 Which text will NOT show on the page?
<!-- <p>My pets</p> -->
<p>I love mangoes.</p>
<p>My best friend</p>
<p>Our school trip</p> (a) My pets (b) I love mangoes. (c) Our school trip (d) My best friend - 34.True or false: <ol> goes inside ul or ol. (a) True (b) False
- 35.📄 What is the first line of an HTML5 page? (a) <body> (b) <html> (c) <!DOCTYPE html> (d) <head>
- 36.True or false: a web browser shows line numbers. (a) True (b) False
-
37.🔗 Which address opens when you click this link?
<a href="about.html">Art corner</a> (a) Art corner (b) about.html (c) https://example.com (d) contact.html -
38.💬 How many paragraphs show on the page?
<!-- <p>Fun facts</p> -->
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<p>Our school trip</p>
<p>The red kite</p> - 39.🏷️ What does a closing tag have that an opening tag does not? (a) a dollar $ (b) a dot . (c) a slash / (d) a hash #
- 40.🏷️ Which is the closing tag for <u>? (a) </u> (b) <u/> (c) <u> (d) <\u>
Answer key
- </h1>
- My Hobbies
- <h1>
- Our school trip
- numbers
- </i>
- has a closing tag
- about.html
- 6
- href
- Our school bus
- True
- False
- False
- False
- <li>
- Match report
- 2
- 2
- True
- 4
- <h6>
- <h1>
- a web browser
- 200
- <h6>
- 3
- opens web pages for us
- <link rel="stylesheet">
- Take the quiz
- My best friend
- <ol>
- My pets
- False
- <!DOCTYPE html>
- False
- about.html
- 4
- a slash /
- </u>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids