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 is the closing tag for <strong>? (a) <strong> (b) <\strong> (c) <strong/> (d) </strong>
- 2.🔍 Which is the odd one out? (a) opens web pages for us (b) sends pages over the net (c) has an address bar (d) turns HTML into a page
- 3.🖼️ Which attribute of <img> names the picture file? (a) width (b) src (c) alt (d) height
-
4.🖼️ How many pixels wide is the picture drawn?
<img src="fort.jpg" alt="An old fort" width="200"> - 5.🔠 Which tag is the least important heading? (a) <h1> (b) <h3> (c) <h6> (d) <p>
- 6.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h6>? (a) <h4> (b) <h1> (c) <h5> (d) <h6>
-
7.📄 What does the browser tab show for this page?
<!DOCTYPE html>
<html>
<head>
<title>Class 7 Blog</title>
</head>
<body>
<h1>All about me</h1>
<p>Here is my best one.</p>
</body>
</html> (a) index.html (b) Here is my best one. (c) Class 7 Blog (d) All about me - 8.Which of these has a closing tag? (a) <meta> (b) <img> (c) <hr> (d) <title>
- 9.🏷️ Is <li> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
- 10.💬 Can anyone read your comments by viewing the page source? (a) No (b) Yes
-
11.💬 How many paragraphs show on the page?
<p>I love mangoes.</p>
<!-- <p>Hello, world!</p> -->
<!-- <p>Fun facts</p> --> - 12.📝 What does <br> do? (a) starts a new line (b) adds a picture (c) makes a list (d) makes text bold
-
13.📋 Does this list show bullets or numbers?
<ol>
<li>Orange</li>
<li>Guava</li>
<li>Papaya</li>
</ol> (a) bullets (b) numbers - 14.📄 Can HTML on its own make headings? (a) Yes (b) No
-
15.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Grapes</li>
<li>Papaya</li>
<li>Mango</li>
<li>Litchi</li>
</ol> - 16.Which of these goes in the head? (a) <ul> (b) <p> (c) <table> (d) <meta charset="utf-8">
-
17.🔗 Where does this link open?
<a href="art.html" target="_blank">Play games</a> (a) in the same tab (b) in a new tab - 18.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h2> or <h5>? (a) <h5> (b) <h3> (c) <h1> (d) <h2>
- 19.📛 In <a href="x.html">, what is href? (a) an element name (b) a closing tag (c) an attribute (d) a comment
-
20.🔗 Where does this link open?
<a href="art.html">School news</a> (a) in a new tab (b) in the same tab - 21.📄 Can HTML on its own add pictures to a page? (a) No (b) Yes
- 22.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h4> or <h5>? (a) <h3> (b) <h4> (c) <h5> (d) <h6>
-
23.💬 Which text will NOT show on the page?
<p>Hello, world!</p>
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p>
<p>I love mangoes.</p> (a) My best friend (b) Hello, world! (c) I love mangoes. (d) Cricket is fun. - 24.Which of these is an opening tag? (a) <li> (b) </li> (c) </p> (d) </b>
-
25.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Kites fly high<br>Stars shine</p> -
26.💬 Which text will NOT show on the page?
<!-- <p>The red kite</p> -->
<p>My best friend</p>
<p>Hello, world!</p>
<p>I love mangoes.</p> (a) My best friend (b) Hello, world! (c) The red kite (d) I love mangoes. - 27.Which of these goes in the body? (a) <meta charset="utf-8"> (b) <style> (c) <title> (d) <a>
- 28.🌍 Which program shows a web page to us? (a) a web browser (b) a calculator (c) a music player (d) a paint program
-
29.📋 How many items does this list show?
<ol>
<li>Grapes</li>
<li>Mango</li>
<li>Banana</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Orange</li>
</ol> - 30.🔠 Which heading shows the BIGGEST text: <h2>, <h1>, <h3> or <h6>? (a) <h2> (b) <h6> (c) <h1> (d) <h3>
- 31.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) src (c) height (d) width
- 32.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h3> or <h1>? (a) <h4> (b) <h1> (c) <h3> (d) <h5>
- 33.🔠 Which tag is used for the main title on a page? (a) <h6> (b) <br> (c) <p> (d) <h1>
-
34.🔗 Which words do you click on?
<a href="contact.html">About us</a> (a) Contact us (b) href (c) About us (d) contact.html -
35.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="100"> (a) moon.png (b) dog.jpg (c) Birthday cake (d) cake.jpg - 36.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small/> (d) <small>
- 37.True or false: HTML on its own cannot make a form. (a) False (b) True
- 38.True or false: <title> goes in the body. (a) False (b) True
- 39.True or false: HTML on its own can make a form. (a) False (b) True
- 40.True or false: in <img>, alt is read by screen readers. (a) False (b) True
Answer key
- </strong>
- sends pages over the net
- src
- 200
- <h6>
- <h6>
- Class 7 Blog
- <title>
- an opening tag
- Yes
- 1
- starts a new line
- numbers
- Yes
- 2
- <meta charset="utf-8">
- in a new tab
- <h1>
- an attribute
- in the same tab
- Yes
- <h6>
- Cricket is fun.
- <li>
- 3
- The red kite
- <a>
- a web browser
- 6
- <h1>
- width
- <h1>
- <h1>
- About us
- cake.jpg
- </small>
- False
- False
- True
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids