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.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="300"> (a) kite.png (b) A red kite (c) Map of India (d) width - 2.📄 Where does <img> go: in the head or in the body? (a) in the head (b) in the body
- 3.📄 Where does <a> go: in the head or in the body? (a) in the head (b) in the body
- 4.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) attribute (c) address (d) editor
- 5.🔗 Which tag makes a clickable link? (a) <link> (b) <p> (c) <a> (d) <img>
-
6.📋 What number does the browser show next to “Papaya”?
<ol>
<li>Litchi</li>
<li>Papaya</li>
<li>Jamun</li>
<li>Banana</li>
</ol> - 7.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as 5 spaces (b) as a new line (c) as a dot (d) as one space
- 8.📝 Does <h1> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
- 9.True or false: <table> goes in the head. (a) True (b) False
- 10.🖼️ Which attribute of <img> shows if the image fails? (a) height (b) alt (c) src (d) width
-
11.🔍 Which line is missing its closing tag?
line 1: <strong>Our school trip</strong>
line 2: <i>Fun facts</i>
line 3: <u>Cricket is fun. (a) line 3 (b) line 2 (c) line 1 -
12.🔗 Which address opens when you click this link?
<a href="news.html">Visit the site</a> (a) Visit the site (b) games.html (c) news.html (d) quiz.html - 13.📄 Can HTML on its own add up two numbers? (a) No (b) Yes
-
14.🔍 Which line is missing its closing tag?
line 1: <h3>Cricket is fun.</h3>
line 2: <h1>I love mangoes.</h1>
line 3: <i>Our school trip (a) line 1 (b) line 2 (c) line 3 - 15.🔠 Which tag is the least important heading? (a) <h6> (b) <h1> (c) <h3> (d) <p>
-
16.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Papaya</li>
<li>Mango</li>
</ul> - 17.Which of these is an empty tag? (a) <li> (b) <p> (c) <title> (d) <meta>
- 18.🏷️ Every HTML tag starts with which sign? (a) ( (b) < (c) [ (d) {
- 19.🌐 Which one hosts websites online? (a) a web browser (b) a web server (c) a code editor
-
20.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="200"> (a) width (b) tiger.jpg (c) A tiger asleep (d) A red kite - 21.Which of these is true of a web browser? (a) is where we type code (b) opens web pages for us (c) saves our .html files (d) hosts websites online
-
22.🔗 Which address opens when you click this link?
<a href="art.html">Maths fun</a> (a) quiz.html (b) Maths fun (c) art.html (d) news.html - 23.True or false: <ul> shows bullet points. (a) False (b) True
- 24.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
- 25.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <head> (c) </html> (d) </head>
-
26.🔍 One closing tag is missing. Which one?
<h3>Our school trip</h3>
<u>My pets</u>
<strong>Fun facts (a) </strong> (b) </h3> (c) </u> (d) </em> - 27.🔗 Which attribute holds the address of a link? (a) id (b) src (c) href (d) alt
-
28.💬 How many paragraphs show on the page?
<p>Fun facts</p>
<p>The red kite</p>
<p>My best friend</p>
<p>My pets</p>
<!-- <p>Our school trip</p> --> - 29.📄 Can HTML on its own count button clicks? (a) No (b) Yes
- 30.🏷️ Is </p> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
-
31.📋 Does this list show bullets or numbers?
<ul>
<li>Banana</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets - 32.🏷️ HTML marks up text using ___. (a) tags (b) wires (c) keys (d) pixels
- 33.🔠 Which heading shows the SMALLEST text: <h3>, <h6>, <h1> or <h5>? (a) <h3> (b) <h5> (c) <h6> (d) <h1>
- 34.True or false: in <img>, width names the picture file. (a) False (b) True
- 35.True or false: HTML on its own cannot make tables. (a) False (b) True
- 36.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h2> or <h5>? (a) <h6> (b) <h2> (c) <h5> (d) <h1>
- 37.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 38.📋 Which list tag is an unordered list? (a) <ol> (b) <li> (c) <ul>
-
39.💬 Which text will NOT show on the page?
<p>Fun facts</p>
<!-- <p>I love mangoes.</p> -->
<p>Hello, world!</p> (a) I love mangoes. (b) Fun facts (c) Hello, world! - 40.🏷️ Is </body> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
Answer key
- A red kite
- in the body
- in the body
- element
- <a>
- 2
- as one space
- has a closing tag
- False
- alt
- line 3
- news.html
- No
- line 3
- <h6>
- 3
- <meta>
- <
- a web server
- A tiger asleep
- opens web pages for us
- art.html
- True
- Yes
- <!DOCTYPE html>
- </strong>
- href
- 4
- No
- a closing tag
- bullets
- tags
- <h6>
- False
- False
- <h1>
- Yes
- <ul>
- I love mangoes.
- a closing tag
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids