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.True or false: <table> goes in the body. (a) False (b) True
-
2.💬 Which text will NOT show on the page?
<p>The red kite</p>
<!-- <p>Good morning!</p> -->
<p>I love mangoes.</p>
<p>Hello, world!</p> (a) The red kite (b) I love mangoes. (c) Hello, world! (d) Good morning! - 3.🔠 Which heading shows the SMALLEST text: <h4>, <h5>, <h6> or <h3>? (a) <h4> (b) <h5> (c) <h6> (d) <h3>
- 4.True or false: <li> has a closing tag. (a) False (b) True
- 5.📝 What does <p> make? (a) a paragraph (b) a link (c) a table (d) a picture
-
6.💬 Which text will NOT show on the page?
<p>I love mangoes.</p>
<!-- <p>My pets</p> -->
<p>Good morning!</p> (a) I love mangoes. (b) My pets (c) Good morning! - 7.📝 You type 5 spaces between two words in a <p>. How does the browser show them? (a) as a dot (b) as 5 spaces (c) as one space (d) as a new line
-
8.🔍 One closing tag is missing. Which one?
<u>My pets</u>
<h2>Rain today</h2>
<h1>Our school trip (a) </h2> (b) </u> (c) </h3> (d) </h1> - 9.True or false: in <img>, alt describes the picture. (a) True (b) False
- 10.📋 Which tag goes around each item of a list? (a) <ol> (b) <p> (c) <ul> (d) <li>
- 11.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) editor (c) attribute (d) element
- 12.🔠 How many <h1> headings should a page usually have? (a) 1 (b) 6 (c) 3 (d) 10
- 13.💬 How does an HTML comment end? (a) --> (b) // (c) */ (d) >>
- 14.True or false: in <img>, height is read by screen readers. (a) False (b) True
- 15.🔤 In “HTML”, what does the M stand for? (a) Modern (b) Mouse (c) Markup (d) Machine
- 16.Which of these is true of a web server? (a) stores a website’s files (b) shows pages from the web (c) has an address bar (d) is where we type code
- 17.Which of these is true of a web browser? (a) colours code to help us (b) is where we type code (c) hosts websites online (d) turns HTML into a page
-
18.📝 On how many lines does the browser show this paragraph?
<p>Sky is blue<br>Kites fly high</p> - 19.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab
- 20.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h6> or <h4>? (a) <h5> (b) <h1> (c) <h4> (d) <h6>
- 21.Which of these goes in the body? (a) <h1> (b) <title> (c) <meta charset="utf-8"> (d) <style>
-
22.🖼️ The picture cannot load. Which text does the browser show instead?
<img src="kite.png" alt="A red kite" width="50"> (a) width (b) kite.png (c) Map of India (d) A red kite - 23.True or false: <p> goes in the head. (a) False (b) True
- 24.True or false: HTML on its own can count button clicks. (a) True (b) False
- 25.True or false: <title> goes in the head. (a) True (b) False
-
26.🖼️ Which picture file does the browser load?
<img src="kite.png" alt="A red kite" width="150"> (a) map.png (b) kite.png (c) A red kite (d) cake.jpg - 27.🖼️ Which attribute of <img> sets how wide it is? (a) width (b) src (c) alt (d) height
- 28.🏷️ Is </p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
- 29.Which of these goes in the head? (a) <a> (b) <style> (c) <ul> (d) <img>
- 30.Which of these is true of a web browser? (a) hosts websites online (b) is where we type code (c) colours code to help us (d) opens web pages for us
-
31.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Litchi</li>
<li>Banana</li>
</ol> (a) numbers (b) bullets -
32.🔗 Where does this link open?
<a href="about.html">Maths fun</a> (a) in the same tab (b) in a new tab -
33.📋 Does this list show bullets or numbers?
<ol>
<li>Mango</li>
<li>Grapes</li>
<li>Guava</li>
</ol> (a) numbers (b) bullets - 34.📋 Which list tag shows bullet points? (a) <ul> (b) <li> (c) <ol>
-
35.🔍 Which line is missing its closing tag?
line 1: <i>The red kite</i>
line 2: <b>Hello, world!
line 3: <h3>Fun facts</h3> (a) line 3 (b) line 1 (c) line 2 -
36.📋 Does this list show bullets or numbers?
<ul>
<li>Litchi</li>
<li>Mango</li>
</ul> (a) numbers (b) bullets -
37.🔠 How many headings are in this code?
<h1>Our school trip</h1>
<p>Good morning!</p>
<h4>The red kite</h4> - 38.True or false: HTML on its own can keep a high score. (a) False (b) True
- 39.True or false: a code editor shows line numbers. (a) True (b) False
- 40.Which of these has a closing tag? (a) <img> (b) <p> (c) <hr> (d) <br>
Answer key
- True
- Good morning!
- <h6>
- True
- a paragraph
- My pets
- as one space
- </h1>
- True
- <li>
- element
- 1
- -->
- False
- Markup
- stores a website’s files
- turns HTML into a page
- 2
- opens it in a new tab
- <h1>
- <h1>
- A red kite
- False
- False
- True
- kite.png
- width
- a closing tag
- <style>
- opens web pages for us
- numbers
- in the same tab
- numbers
- <ul>
- line 2
- bullets
- 2
- False
- True
- <p>
Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids