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 heading shows the BIGGEST text: <h1>, <h6>, <h2> or <h3>? (a) <h2> (b) <h3> (c) <h6> (d) <h1>
- 2.🔠 Which heading shows the SMALLEST text: <h2>, <h5>, <h3> or <h1>? (a) <h3> (b) <h2> (c) <h5> (d) <h1>
- 3.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
-
4.🔗 Which address opens when you click this link?
<a href="https://example.com">Maths fun</a> (a) art.html (b) Maths fun (c) https://example.com (d) maths.html - 5.🔗 Which attribute holds the address of a link? (a) href (b) alt (c) id (d) src
-
6.🔍 One closing tag is missing. Which one?
<h2>I love mangoes.</h2>
<small>My pets</small>
<em>Our school trip (a) </strong> (b) </em> (c) </h2> (d) </small> - 7.🏷️ Which is the closing tag for <u>? (a) </u> (b) <\u> (c) <u/> (d) <u>
- 8.Which of these is an opening tag? (a) </li> (b) </b> (c) </h1> (d) <body>
-
9.🔍 One closing tag is missing. Which one?
<u>Fun facts</u>
<strong>Our school trip
<i>The red kite</i> (a) </strong> (b) </h3> (c) </u> (d) </i> - 10.True or false: a web browser hosts websites online. (a) True (b) False
-
11.📝 On how many lines does the browser show this paragraph?
<p>Roses are red<br>Birds sing</p> - 12.📋 Which tag goes around each item of a list? (a) <ol> (b) <ul> (c) <p> (d) <li>
-
13.📋 Does this list show bullets or numbers?
<ul>
<li>Papaya</li>
<li>Mango</li>
</ul> (a) bullets (b) numbers -
14.💬 How many paragraphs show on the page?
<p>Hello, world!</p>
<!-- <p>Our school trip</p> -->
<p>My pets</p>
<!-- <p>I love mangoes.</p> --> - 15.🔠 Are headings shown in bold by default? (a) No (b) Yes
- 16.🧱 HTML gives a web page its ___. (a) sound (b) speed (c) structure (d) colours
-
17.📋 What number does the browser show next to “Mango”?
<ol start="7">
<li>Litchi</li>
<li>Banana</li>
<li>Orange</li>
<li>Grapes</li>
<li>Mango</li>
</ol> - 18.Which of these is true of a web server? (a) stores a website’s files (b) colours code to help us (c) has an address bar (d) shows pages from the web
-
19.📋 What number does the browser show next to “Grapes”?
<ol start="5">
<li>Banana</li>
<li>Orange</li>
<li>Jamun</li>
<li>Guava</li>
<li>Papaya</li>
<li>Grapes</li>
</ol> -
20.🔗 Where does this link open?
<a href="art.html" target="_blank">Visit the site</a> (a) in a new tab (b) in the same tab - 21.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h4>? (a) <h5> (b) <h4> (c) <h3> (d) <h1>
-
22.💬 How many paragraphs show on the page?
<p>Our school trip</p>
<!-- <p>Rain today</p> -->
<!-- <p>Cricket is fun.</p> -->
<p>My best friend</p>
<!-- <p>Hello, world!</p> --> - 23.True or false: a web browser opens web pages for us. (a) False (b) True
-
24.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Guava</li>
<li>Papaya</li>
</ol> (a) bullets (b) numbers - 25.True or false: <ul> is one item of a list. (a) True (b) False
- 26.True or false: <style> goes in the body. (a) False (b) True
- 27.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 28.🔠 Which heading shows the SMALLEST text: <h6>, <h4>, <h2> or <h5>? (a) <h2> (b) <h4> (c) <h6> (d) <h5>
- 29.True or false: <li> goes inside ul or ol. (a) True (b) False
-
30.📋 How many items does this list show?
<ul>
<li>Litchi</li>
<li>Mango</li>
<li>Jamun</li>
<li>Grapes</li>
<li>Orange</li>
</ul> - 31.🔗 Which code links to about.html? (a) <a href="about.html"> (b) <link about.html> (c) <a alt="about.html"> (d) <a src="about.html">
- 32.🌐 Which one stores a website’s files? (a) a web server (b) a web browser (c) a code editor
-
33.🔗 Where does this link open?
<a href="art.html" target="_blank">School news</a> (a) in the same tab (b) in a new tab - 34.Which of these is a closing tag? (a) </h1> (b) <body> (c) <title> (d) <h1>
- 35.True or false: HTML on its own can make links to pages. (a) True (b) False
-
36.🔠 How many headings are in this code?
<h1>My pets</h1>
<p>Cricket is fun.</p>
<p>Hello, world!</p>
<h4>My pets</h4>
<p>My pets</p> -
37.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Good morning!</p>
<p>Cricket is fun.</p>
<p>My best friend</p> -
38.🖼️ Which picture file does the browser load?
<img src="cake.jpg" alt="Birthday cake" width="200"> (a) cake.jpg (b) moon.png (c) Birthday cake (d) dog.jpg - 39.💬 How does an HTML comment start? (a) # (b) <!-- (c) // (d) /*
- 40.📝 What does <p> make? (a) a paragraph (b) a link (c) a picture (d) a table
Answer key
- <h1>
- <h5>
- to describe the image
- https://example.com
- href
- </em>
- </u>
- <body>
- </strong>
- False
- 2
- <li>
- bullets
- 2
- Yes
- structure
- 11
- stores a website’s files
- 10
- in a new tab
- <h1>
- 2
- True
- numbers
- False
- False
- a closing tag
- <h6>
- True
- 5
- <a href="about.html">
- a web server
- in a new tab
- </h1>
- True
- 2
- 1
- cake.jpg
- <!--
- a paragraph
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids