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 tag is the least important heading? (a) <p> (b) <h3> (c) <h6> (d) <h1>
-
2.🔗 Which address opens when you click this link?
<a href="quiz.html">School news</a> (a) quiz.html (b) about.html (c) School news (d) games.html - 3.💬 Does the browser show comments on the page? (a) No (b) Yes
-
4.🔗 Where does this link open?
<a href="about.html">About us</a> (a) in a new tab (b) in the same tab - 5.Which of these has a closing tag? (a) <br> (b) <img> (c) <title> (d) <hr>
-
6.📝 On how many lines does the browser show this paragraph?
<p>Rivers flow<br>Sky is blue</p> -
7.🔍 Which line is missing its closing tag?
line 1: <h3>Our school trip
line 2: <p>My pets</p>
line 3: <h2>Fun facts</h2> (a) line 3 (b) line 2 (c) line 1 -
8.📄 What is the big heading shown on this page?
<!DOCTYPE html>
<html>
<head>
<title>Riya’s Recipes</title>
</head>
<body>
<h1>All about me</h1>
<p>Try this poha.</p>
</body>
</html> (a) Try this poha. (b) body (c) Riya’s Recipes (d) All about me - 9.🖼️ Which attribute of <img> sets how tall it is? (a) height (b) alt (c) src (d) width
- 10.True or false: <li> lists things in any order. (a) True (b) False
- 11.True or false: a code editor has an address bar. (a) True (b) False
- 12.🏷️ Which is the closing tag for <h2>? (a) <h2/> (b) </h2> (c) <\h2> (d) <h2>
- 13.Which of these is a closing tag? (a) <p> (b) <b> (c) <body> (d) </b>
- 14.True or false: in <img>, width shows if the image fails. (a) False (b) True
-
15.💬 Which text will NOT show on the page?
<p>Cricket is fun.</p>
<!-- <p>Fun facts</p> -->
<p>My best friend</p> (a) My best friend (b) Cricket is fun. (c) Fun facts - 16.🏷️ Is <h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 17.True or false: <p> goes in the head. (a) True (b) False
- 18.Which of these is true of a web server? (a) saves our .html files (b) shows line numbers (c) sends pages over the net (d) colours code to help us
-
19.🔗 Which words do you click on?
<a href="quiz.html">Visit the site</a> (a) Maths fun (b) quiz.html (c) href (d) Visit the site -
20.💬 How many paragraphs show on the page?
<p>My pets</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>My best friend</p> -->
<p>I love mangoes.</p>
<p>Cricket is fun.</p> - 21.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
22.🔗 Which address opens when you click this link?
<a href="quiz.html">Maths fun</a> (a) Maths fun (b) games.html (c) quiz.html (d) about.html - 23.🏷️ Every HTML tag starts with which sign? (a) [ (b) { (c) ( (d) <
- 24.📄 Where does <style> go: in the head or in the body? (a) in the head (b) in the body
- 25.🖼️ Which attribute of <img> tells which image to load? (a) width (b) height (c) src (d) alt
- 26.🌐 Which one is where we type code? (a) a code editor (b) a web browser (c) a web server
-
27.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<p>The red kite</p>
<p>Rain today</p>
<!-- <p>I love mangoes.</p> -->
<p>My pets</p> - 28.🔗 Which attribute holds the address of a link? (a) src (b) id (c) href (d) alt
-
29.📋 What number does the browser show next to “Guava”?
<ol start="9">
<li>Grapes</li>
<li>Papaya</li>
<li>Guava</li>
<li>Orange</li>
</ol> - 30.True or false: a web server opens web pages for us. (a) False (b) True
- 31.True or false: in <img>, src tells which image to load. (a) True (b) False
- 32.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <ol> (c) <br> (d) <hr>
- 33.💬 How does an HTML comment end? (a) // (b) */ (c) --> (d) >>
-
34.🔍 Which line is missing its closing tag?
line 1: <strong>Good morning!
line 2: <b>Fun facts</b>
line 3: <h1>My pets</h1> (a) line 2 (b) line 3 (c) line 1 -
35.🔍 One closing tag is missing. Which one?
<h3>Fun facts</h3>
<p>Rain today</p>
<i>My best friend (a) </h3> (b) </p> (c) </h2> (d) </i> - 36.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <li> (d) <ul>
-
37.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<p>Cricket is fun.</p>
<p>Rain today</p>
<p>Our school trip</p>
<!-- <p>Good morning!</p> --> -
38.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Guava</li>
<li>Grapes</li>
</ul> (a) numbers (b) bullets -
39.🖼️ Which picture file does the browser load?
<img src="bus.jpg" alt="Our school bus" width="250"> (a) fort.jpg (b) bus.jpg (c) Our school bus (d) tiger.jpg - 40.🔢 In a basic web page file, which comes FIRST? (a) <html> (b) <body> (c) <!DOCTYPE html> (d) </html>
Answer key
- <h6>
- quiz.html
- No
- in the same tab
- <title>
- 2
- line 1
- All about me
- height
- False
- False
- </h2>
- </b>
- False
- Fun facts
- an opening tag
- False
- sends pages over the net
- Visit the site
- 3
- an opening tag
- quiz.html
- <
- in the head
- src
- a code editor
- 4
- href
- 11
- False
- True
- <ol>
- -->
- line 1
- </i>
- <li>
- 4
- bullets
- bus.jpg
- <!DOCTYPE html>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids