← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 81 · 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.💬 How does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
  2. 2.🔠 How many heading levels does HTML have? (a) 10 (b) 3 (c) 4 (d) 6
  3. 3.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h5> or <h1>? (a) <h1> (b) <h3> (c) <h6> (d) <h5>
  4. 4.📄 Can HTML on its own make tables? (a) No (b) Yes
  5. 5.🔠 Which tag is the least important heading? (a) <p> (b) <h6> (c) <h1> (d) <h3>
  6. 6.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="100">
    (a) cake.jpg (b) map.png (c) kite.png (d) A red kite
  7. 7.📋 Which tag goes around each item of a list? (a) <p> (b) <li> (c) <ul> (d) <ol>
  8. 8.🔍 Which line is missing its closing tag?
    line 1: <strong>Fun facts
    line 2: <h1>Hello, world!</h1>
    line 3: <p>The red kite</p>
    (a) line 1 (b) line 3 (c) line 2
  9. 9.📋 Does this list show bullets or numbers?
    <ol>
      <li>Mango</li>
      <li>Orange</li>
    </ol>
    (a) numbers (b) bullets
  10. 10.📝 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 a new line (d) as one space
  11. 11.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to load it faster (c) to colour it (d) to describe the image
  12. 12.Which of these is an opening tag? (a) </b> (b) </h1> (c) </p> (d) <body>
  13. 13.🔍 Which line is missing its closing tag?
    line 1: <p>Fun facts
    line 2: <h3>My pets</h3>
    line 3: <h2>I love mangoes.</h2>
    (a) line 2 (b) line 1 (c) line 3
  14. 14.💬 Which text will NOT show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>The red kite</p>
    <p>My best friend</p>
    (a) The red kite (b) My best friend (c) Hello, world!
  15. 15.🔍 Which line is missing its closing tag?
    line 1: <strong>Good morning!</strong>
    line 2: <u>My best friend
    line 3: <em>The red kite</em>
    (a) line 1 (b) line 3 (c) line 2
  16. 16.💬 How many paragraphs show on the page?
    <!-- <p>Hello, world!</p> -->
    <p>Cricket is fun.</p>
    <!-- <p>Fun facts</p> -->
  17. 17.True or false: in <img>, alt tells which image to load. (a) False (b) True
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="250">
    (a) width (b) A happy dog (c) Birthday cake (d) cake.jpg
  19. 19.🏷️ HTML marks up text using ___. (a) wires (b) pixels (c) keys (d) tags
  20. 20.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Good morning!</p>
    (a) Rain today (b) Good morning! (c) Cricket is fun. (d) Hello, world!
  21. 21.Which of these goes in the body? (a) <a> (b) <title> (c) <style> (d) <meta charset="utf-8">
  22. 22.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="350">
    (a) Our school bus (b) tiger.jpg (c) fort.jpg (d) bus.jpg
  23. 23.Which of these is a closing tag? (a) <b> (b) <p> (c) <title> (d) </b>
  24. 24.🔠 Which heading shows the BIGGEST text: <h3>, <h4>, <h1> or <h2>? (a) <h4> (b) <h3> (c) <h1> (d) <h2>
  25. 25.True or false: HTML on its own can make a form. (a) False (b) True
  26. 26.True or false: in <img>, height sets how tall it is. (a) False (b) True
  27. 27.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <p> (c) <h6> (d) <br>
  28. 28.True or false: <title> goes in the body. (a) False (b) True
  29. 29.📋 How many items does this list show?
    <ol>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Mango</li>
      <li>Guava</li>
    </ol>
  30. 30.🔤 In “HTML”, what does the L stand for? (a) Language (b) Laptop (c) Link (d) Line
  31. 31.Which of these is an opening tag? (a) </b> (b) </p> (c) <h1> (d) </li>
  32. 32.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="200">
    (a) The full moon (b) dog.jpg (c) A happy dog (d) width
  33. 33.🔍 Which line is missing its closing tag?
    line 1: <h3>Hello, world!</h3>
    line 2: <p>Rain today</p>
    line 3: <b>Cricket is fun.
    (a) line 2 (b) line 1 (c) line 3
  34. 34.🏷️ Is <b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  35. 35.💬 Which text will NOT show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My best friend</p>
    <p>I love mangoes.</p>
    <p>Rain today</p>
    (a) Our school trip (b) My best friend (c) I love mangoes. (d) Rain today
  36. 36.True or false: <meta charset="utf-8"> goes in the head. (a) True (b) False
  37. 37.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) address (c) attribute (d) editor
  38. 38.📄 What is the first line of an HTML5 page? (a) <head> (b) <body> (c) <!DOCTYPE html> (d) <html>
  39. 39.📋 Which list tag lists things in any order? (a) <ol> (b) <ul> (c) <li>
  40. 40.🔢 In a basic web page file, which comes LAST? (a) <body> (b) </html> (c) </head> (d) <html>

Answer key

  1. <!--
  2. 6
  3. <h1>
  4. Yes
  5. <h6>
  6. kite.png
  7. <li>
  8. line 1
  9. numbers
  10. as one space
  11. to describe the image
  12. <body>
  13. line 1
  14. Hello, world!
  15. line 2
  16. 1
  17. False
  18. Birthday cake
  19. tags
  20. Cricket is fun.
  21. <a>
  22. bus.jpg
  23. </b>
  24. <h1>
  25. True
  26. True
  27. <h1>
  28. False
  29. 4
  30. Language
  31. <h1>
  32. A happy dog
  33. line 3
  34. an opening tag
  35. Our school trip
  36. True
  37. element
  38. <!DOCTYPE html>
  39. <ul>
  40. </html>

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