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: <h2>, <h1>, <h3> or <h4>? (a) <h2> (b) <h3> (c) <h4> (d) <h1>
-
2.🔠 How many headings are in this code?
<h1>Fun facts</h1>
<p>Fun facts</p>
<h3>I love mangoes.</h3>
<h3>My pets</h3> - 3.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
- 4.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a alt="about.html"> (c) <link about.html> (d) <a href="about.html">
- 5.🔠 Which heading shows the SMALLEST text: <h1>, <h2>, <h4> or <h6>? (a) <h6> (b) <h4> (c) <h1> (d) <h2>
- 6.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ul> (d) <ol>
- 7.Which of these is true of a code editor? (a) stores a website’s files (b) colours code to help us (c) turns HTML into a page (d) sends pages over the net
- 8.📄 Where does <p> go: in the head or in the body? (a) in the head (b) in the body
- 9.Which of these goes in the head? (a) <a> (b) <title> (c) <h1> (d) <p>
-
10.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Banana</li>
<li>Litchi</li>
</ul> - 11.Which of these goes in the body? (a) <style> (b) <title> (c) <a> (d) <meta charset="utf-8">
-
12.🔍 One closing tag is missing. Which one?
<b>Hello, world!
<h3>Fun facts</h3>
<strong>I love mangoes.</strong> (a) </b> (b) </i> (c) </strong> (d) </h3> - 13.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h2> or <h6>? (a) <h2> (b) <h3> (c) <h6> (d) <h4>
-
14.📋 How many items does this list show?
<ul>
<li>Orange</li>
<li>Guava</li>
<li>Grapes</li>
<li>Banana</li>
<li>Papaya</li>
</ul> -
15.🔍 One closing tag is missing. Which one?
<u>Hello, world!</u>
<h3>The red kite</h3>
<i>Good morning! (a) </h3> (b) </i> (c) </u> (d) </em> -
16.📋 How many items does this list show?
<ul>
<li>Grapes</li>
<li>Jamun</li>
<li>Orange</li>
<li>Litchi</li>
</ul> -
17.📋 How many items does this list show?
<ol>
<li>Papaya</li>
<li>Banana</li>
<li>Litchi</li>
<li>Guava</li>
</ol> - 18.🖼️ Which attribute of <img> names the picture file? (a) alt (b) height (c) width (d) src
- 19.True or false: in <img>, alt sets how wide it is. (a) False (b) True
-
20.📝 How many paragraphs does this code make?
<p>Cricket is fun.</p>
<p>Good morning!</p>
<h2>Good morning!</h2>
<h2>I love mangoes.</h2>
<p>My best friend</p> -
21.💬 Which text will NOT show on the page?
<p>My best friend</p>
<p>Good morning!</p>
<!-- <p>Rain today</p> -->
<p>Our school trip</p> (a) Our school trip (b) Good morning! (c) Rain today (d) My best friend -
22.📋 What number does the browser show next to “Banana”?
<ol>
<li>Papaya</li>
<li>Jamun</li>
<li>Banana</li>
<li>Mango</li>
</ol> - 23.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h6> or <h1>? (a) <h5> (b) <h1> (c) <h3> (d) <h6>
- 24.🔗 Which tag makes a clickable link? (a) <a> (b) <img> (c) <link> (d) <p>
- 25.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
-
26.🔗 Where does this link open?
<a href="contact.html">School news</a> (a) in a new tab (b) in the same tab - 27.🔠 Which heading shows the BIGGEST text: <h4>, <h2>, <h1> or <h3>? (a) <h1> (b) <h3> (c) <h4> (d) <h2>
- 28.📋 Which list tag lists steps in order? (a) <ol> (b) <li> (c) <ul>
-
29.🔍 Which line is missing its closing tag?
line 1: <h2>Fun facts
line 2: <em>Our school trip</em>
line 3: <i>My pets</i> (a) line 1 (b) line 2 (c) line 3 -
30.📋 How many items does this list show?
<ul>
<li>Banana</li>
<li>Litchi</li>
<li>Grapes</li>
<li>Papaya</li>
</ul> -
31.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="200"> (a) A red kite (b) cake.jpg (c) map.png (d) kite.png - 32.Which of these is true of a web browser? (a) shows pages from the web (b) hosts websites online (c) answers page requests (d) colours code to help us
-
33.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="tiger.jpg" alt="A tiger asleep" width="350"> (a) tiger.jpg (b) A tiger asleep (c) A red kite (d) width - 34.💬 How does an HTML comment start? (a) <!-- (b) # (c) // (d) /*
- 35.Which of these is an opening tag? (a) </h1> (b) <title> (c) </title> (d) </p>
- 36.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
- 37.📄 What is the first line of an HTML5 page? (a) <html> (b) <head> (c) <body> (d) <!DOCTYPE html>
-
38.🖼️ How many pixels wide is the picture drawn?
<img src="cake.jpg" alt="Birthday cake" width="150"> -
39.🔍 One closing tag is missing. Which one?
<h3>Good morning!</h3>
<h2>Rain today</h2>
<i>The red kite (a) </i> (b) </h2> (c) </h3> (d) </h1> - 40.True or false: <ol> shows 1, 2, 3 numbers. (a) True (b) False
Answer key
- <h1>
- 3
- <ul>
- <a href="about.html">
- <h6>
- <ul>
- colours code to help us
- in the body
- <title>
- 3
- <a>
- </b>
- <h6>
- 5
- </i>
- 4
- 4
- src
- False
- 3
- Rain today
- 3
- <h1>
- <a>
- opens it in a new tab
- in the same tab
- <h1>
- <ol>
- line 1
- 4
- kite.png
- shows pages from the web
- A tiger asleep
- <!--
- <title>
- has a closing tag
- <!DOCTYPE html>
- 150
- </i>
- True
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids