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.📝 What does <hr> draw? (a) a picture (b) a table (c) a line across the page (d) a link
- 2.📝 Does <li> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 3.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
-
4.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>My best friend</p> -->
<!-- <p>I love mangoes.</p> -->
<p>Our school trip</p>
<!-- <p>Hello, world!</p> --> - 5.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h6> or <h3>? (a) <h6> (b) <h3> (c) <h2> (d) <h4>
-
6.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>My best friend</p>
<h3>I love mangoes.</h3> - 7.💬 How does an HTML comment end? (a) */ (b) // (c) --> (d) >>
- 8.Which of these is an empty tag? (a) <b> (b) <br> (c) <ul> (d) <p>
- 9.📋 Which list tag shows 1, 2, 3 numbers? (a) <li> (b) <ol> (c) <ul>
- 10.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
- 11.🌐 Which one is where we type code? (a) a web server (b) a web browser (c) a code editor
- 12.🏷️ Which is the closing tag for <b>? (a) <b> (b) </b> (c) <\b> (d) <b/>
- 13.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h2>? (a) <h5> (b) <h3> (c) <h2> (d) <h1>
- 14.Which of these goes in the body? (a) <link rel="stylesheet"> (b) <title> (c) <meta charset="utf-8"> (d) <h1>
- 15.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h4> or <h3>? (a) <h2> (b) <h5> (c) <h3> (d) <h4>
- 16.🧱 HTML gives a web page its ___. (a) structure (b) sound (c) colours (d) speed
- 17.True or false: <br> has a closing tag. (a) True (b) False
-
18.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>Welcome!</h1>
<p>Thanks for visiting.</p>
</body>
</html> (a) Class 7 Blog (b) Thanks for visiting. (c) body (d) Welcome! -
19.📋 What number does the browser show next to “Jamun”?
<ol start="8">
<li>Banana</li>
<li>Jamun</li>
<li>Guava</li>
<li>Litchi</li>
<li>Grapes</li>
</ol> - 20.Which of these is a closing tag? (a) </h1> (b) <body> (c) <h1> (d) <title>
-
21.🔗 Which address opens when you click this link?
<a href="news.html">Play games</a> (a) quiz.html (b) Play games (c) news.html (d) games.html -
22.🔗 Which words do you click on?
<a href="news.html">Play games</a> (a) About us (b) news.html (c) href (d) Play games - 23.💬 Why do coders write comments? (a) to make links (b) to add colour (c) to show pictures (d) to leave notes
- 24.📄 What is the first line of an HTML5 page? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) <head>
- 25.Which of these is a closing tag? (a) <p> (b) <h1> (c) <title> (d) </li>
-
26.💬 How many paragraphs show on the page?
<!-- <p>Cricket is fun.</p> -->
<p>Hello, world!</p>
<p>Rain today</p>
<p>My best friend</p>
<p>The red kite</p> -
27.🔗 Which words do you click on?
<a href="games.html">Visit the site</a> (a) href (b) Maths fun (c) games.html (d) Visit the site - 28.📄 Where does the text of <title> appear? (a) at the bottom (b) in a big heading (c) nowhere (d) on the browser tab
- 29.🖼️ Which attribute of <img> tells which image to load? (a) height (b) alt (c) width (d) src
- 30.True or false: in <img>, height sets how tall it is. (a) False (b) True
-
31.🔗 Where does this link open?
<a href="contact.html" target="_blank">Visit the site</a> (a) in the same tab (b) in a new tab - 32.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h3> or <h6>? (a) <h5> (b) <h3> (c) <h6> (d) <h1>
- 33.📄 Can HTML on its own make headings? (a) No (b) Yes
- 34.📄 Where does <link rel="stylesheet"> go: in the head or in the body? (a) in the head (b) in the body
- 35.True or false: <li> goes inside ul or ol. (a) False (b) True
-
36.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<!-- <p>Our school trip</p> -->
<p>Hello, world!</p>
<p>My pets</p>
<p>Cricket is fun.</p> - 37.True or false: in <img>, alt is read by screen readers. (a) False (b) True
- 38.🔗 What does target="_blank" do to a link? (a) opens it in a new tab (b) makes it bold (c) hides the link (d) makes it blank
- 39.Which of these goes in the body? (a) <ul> (b) <style> (c) <link rel="stylesheet"> (d) <meta charset="utf-8">
- 40.True or false: HTML on its own can make headings. (a) False (b) True
Answer key
- a line across the page
- has a closing tag
- an opening tag
- 2
- <h2>
- 2
- -->
- <br>
- <ol>
- <img>
- a code editor
- </b>
- <h1>
- <h1>
- <h2>
- structure
- False
- Welcome!
- 9
- </h1>
- news.html
- Play games
- to leave notes
- <!DOCTYPE html>
- </li>
- 4
- Visit the site
- on the browser tab
- src
- True
- in a new tab
- <h1>
- Yes
- in the head
- True
- 4
- True
- opens it in a new tab
- <ul>
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids