← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 461 · 40 questions
TalentJR

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. 1.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  2. 2.🔗 Where does this link open?
    <a href="quiz.html">Play games</a>
    (a) in the same tab (b) in a new tab
  3. 3.🔍 One closing tag is missing. Which one?
    <em>Good morning!
    <h2>My pets</h2>
    <h1>Hello, world!</h1>
    (a) </h2> (b) </small> (c) </em> (d) </h1>
  4. 4.🔠 Which heading shows the BIGGEST text: <h2>, <h5>, <h4> or <h3>? (a) <h2> (b) <h5> (c) <h4> (d) <h3>
  5. 5.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    (a) Hello, world! (b) Good morning! (c) Cricket is fun. (d) The red kite
  6. 6.True or false: <img> goes in the body. (a) False (b) True
  7. 7.True or false: <title> has a closing tag. (a) True (b) False
  8. 8.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="250">
    (a) kite.png (b) A red kite (c) Map of India (d) width
  9. 9.📝 What does <br> do? (a) makes a list (b) makes text bold (c) starts a new line (d) adds a picture
  10. 10.True or false: <table> goes in the body. (a) True (b) False
  11. 11.💬 Why do coders write comments? (a) to leave notes (b) to make links (c) to show pictures (d) to add colour
  12. 12.🖼️ Which tag puts a picture on a page? (a) <p> (b) <img> (c) <pic> (d) <a>
  13. 13.🔗 Which code links to about.html? (a) <a alt="about.html"> (b) <a src="about.html"> (c) <link about.html> (d) <a href="about.html">
  14. 14.🔠 How many headings are in this code?
    <h1>Hello, world!</h1>
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <h3>Good morning!</h3>
    <h2>Good morning!</h2>
  15. 15.🔍 One closing tag is missing. Which one?
    <p>My best friend
    <small>Cricket is fun.</small>
    <em>My pets</em>
    (a) </p> (b) </u> (c) </em> (d) </small>
  16. 16.Which of these has a closing tag? (a) <hr> (b) <img> (c) <input> (d) <h1>
  17. 17.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 3 (d) 4
  18. 18.🖼️ Does <img> need a closing tag? (a) No (b) Yes
  19. 19.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Stars shine<br>Kites fly high<br>Birds sing<br>Sky is blue</p>
  20. 20.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="150">
    (a) dog.jpg (b) Map of India (c) map.png (d) cake.jpg
  21. 21.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>I love mangoes.</p>
    <p>Our school trip</p>
    <!-- <p>Cricket is fun.</p> -->
    (a) I love mangoes. (b) Cricket is fun. (c) Our school trip (d) My pets
  22. 22.🔗 Which words do you click on?
    <a href="news.html">Take the quiz</a>
    (a) news.html (b) Take the quiz (c) Play games (d) href
  23. 23.📋 Which list suits a shopping list in any order? (a) <hr> (b) <ul> (c) <ol> (d) <br>
  24. 24.🔗 Where does this link open?
    <a href="games.html" target="_blank">Maths fun</a>
    (a) in a new tab (b) in the same tab
  25. 25.Which of these goes in the body? (a) <h1> (b) <title> (c) <style> (d) <link rel="stylesheet">
  26. 26.🏷️ Which is the closing tag for <em>? (a) <\em> (b) <em/> (c) </em> (d) <em>
  27. 27.🔠 Which heading shows the SMALLEST text: <h1>, <h5>, <h3> or <h2>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
  28. 28.📋 What number does the browser show next to “Papaya”?
    <ol start="9">
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Banana</li>
      <li>Mango</li>
      <li>Orange</li>
    </ol>
  29. 29.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <h4>My pets</h4>
    <h2>Cricket is fun.</h2>
    <h4>I love mangoes.</h4>
  30. 30.🔠 Which heading shows the SMALLEST text: <h4>, <h2>, <h1> or <h3>? (a) <h1> (b) <h2> (c) <h4> (d) <h3>
  31. 31.🏷️ Which is the closing tag for <h2>? (a) <h2> (b) <h2/> (c) </h2> (d) <\h2>
  32. 32.Which of these is an empty tag? (a) <input> (b) <p> (c) <h1> (d) <b>
  33. 33.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  34. 34.📋 Which tag goes around each item of a list? (a) <p> (b) <ul> (c) <li> (d) <ol>
  35. 35.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Orange</li>
    </ul>
  36. 36.🔢 In a basic web page file, which comes LAST? (a) <body> (b) <head> (c) </head> (d) </html>
  37. 37.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
    (a) tiger.jpg (b) A tiger asleep (c) map.png (d) kite.png
  38. 38.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="bus.jpg" alt="Our school bus" width="200">
    (a) width (b) Our school bus (c) An old fort (d) bus.jpg
  39. 39.Which of these is a closing tag? (a) <h1> (b) </li> (c) <p> (d) <body>
  40. 40.🔍 Which is the odd one out? (a) shows line numbers (b) has an address bar (c) opens web pages for us (d) turns HTML into a page

Answer key

  1. No
  2. in the same tab
  3. </em>
  4. <h2>
  5. Hello, world!
  6. True
  7. True
  8. A red kite
  9. starts a new line
  10. True
  11. to leave notes
  12. <img>
  13. <a href="about.html">
  14. 3
  15. </p>
  16. <h1>
  17. 6
  18. No
  19. 5
  20. map.png
  21. Cricket is fun.
  22. Take the quiz
  23. <ul>
  24. in a new tab
  25. <h1>
  26. </em>
  27. <h5>
  28. 10
  29. 4
  30. <h4>
  31. </h2>
  32. <input>
  33. Yes
  34. <li>
  35. 2
  36. </html>
  37. tiger.jpg
  38. Our school bus
  39. </li>
  40. shows line numbers

Free html and css lessons, practice and worksheets at talentjr.in/html-css-for-kids