← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 867 · 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.True or false: <table> goes in the body. (a) False (b) True
  2. 2.📋 How many items does this list show?
    <ol>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Banana</li>
    </ol>
  3. 3.🔠 Which heading shows the BIGGEST text: <h1>, <h2>, <h3> or <h6>? (a) <h3> (b) <h2> (c) <h1> (d) <h6>
  4. 4.💬 How many paragraphs show on the page?
    <p>Hello, world!</p>
    <p>Rain today</p>
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <!-- <p>My pets</p> -->
  5. 5.🔍 One closing tag is missing. Which one?
    <small>My best friend
    <p>Our school trip</p>
    <em>Good morning!</em>
    (a) </small> (b) </strong> (c) </p> (d) </em>
  6. 6.True or false: <h1> goes in the head. (a) False (b) True
  7. 7.💬 Can anyone read your comments by viewing the page source? (a) Yes (b) No
  8. 8.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="250">
    (a) A red kite (b) cake.jpg (c) map.png (d) kite.png
  9. 9.🏷️ HTML marks up text using ___. (a) wires (b) keys (c) pixels (d) tags
  10. 10.True or false: <style> goes in the head. (a) False (b) True
  11. 11.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="300">
    (a) width (b) kite.png (c) A red kite (d) Map of India
  12. 12.🔍 One closing tag is missing. Which one?
    <h2>My pets
    <p>My best friend</p>
    <h1>The red kite</h1>
    (a) </h1> (b) </p> (c) </em> (d) </h2>
  13. 13.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) </head> (c) <body> (d) <!DOCTYPE html>
  14. 14.🏷️ Every HTML tag starts with which sign? (a) ( (b) { (c) [ (d) <
  15. 15.💬 Why do coders write comments? (a) to make links (b) to show pictures (c) to leave notes (d) to add colour
  16. 16.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <h2>My pets</h2>
    <h2>Hello, world!</h2>
    <h2>Our school trip</h2>
  17. 17.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  18. 18.📝 How many paragraphs does this code make?
    <p>Fun facts</p>
    <h2>I love mangoes.</h2>
    <h2>Cricket is fun.</h2>
    <h2>My best friend</h2>
    <h2>My pets</h2>
    <h2>Our school trip</h2>
  19. 19.🔍 Which line is missing its closing tag?
    line 1: <b>Hello, world!</b>
    line 2: <em>Good morning!
    line 3: <i>I love mangoes.</i>
    (a) line 1 (b) line 3 (c) line 2
  20. 20.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="400">
  21. 21.🖼️ How many pixels wide is the picture drawn?
    <img src="bus.jpg" alt="Our school bus" width="250">
  22. 22.📄 Can HTML on its own run a game loop? (a) No (b) Yes
  23. 23.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>Fun facts</p>
    <!-- <p>Hello, world!</p> -->
  24. 24.💬 How does an HTML comment end? (a) // (b) >> (c) */ (d) -->
  25. 25.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h6> or <h3>? (a) <h2> (b) <h3> (c) <h6> (d) <h5>
  26. 26.🏷️ Which is the closing tag for <h1>? (a) <h1/> (b) <h1> (c) </h1> (d) <\h1>
  27. 27.🔍 One closing tag is missing. Which one?
    <b>Hello, world!
    <h1>Fun facts</h1>
    <h2>The red kite</h2>
    (a) </small> (b) </h1> (c) </h2> (d) </b>
  28. 28.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>My Hobbies</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) My Hobbies (b) body (c) All about me (d) Thanks for visiting.
  29. 29.💬 How many paragraphs show on the page?
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>My best friend</p> -->
  30. 30.🏷️ Which is the closing tag for <small>? (a) </small> (b) <small> (c) <\small> (d) <small/>
  31. 31.True or false: <ul> lists things in any order. (a) True (b) False
  32. 32.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Grapes</li>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ul>
  33. 33.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Birds sing<br>Kites fly high</p>
  34. 34.🔍 Which line is missing its closing tag?
    line 1: <em>Rain today
    line 2: <i>My best friend</i>
    line 3: <strong>Our school trip</strong>
    (a) line 3 (b) line 1 (c) line 2
  35. 35.🖼️ Why do we add alt text to an image? (a) to colour it (b) to load it faster (c) to make it bigger (d) to describe the image
  36. 36.📋 Which list tag shows 1, 2, 3 numbers? (a) <ol> (b) <ul> (c) <li>
  37. 37.📝 What does <br> do? (a) makes a list (b) starts a new line (c) makes text bold (d) adds a picture
  38. 38.💬 How many paragraphs show on the page?
    <p>Rain today</p>
    <p>Hello, world!</p>
    <p>The red kite</p>
    <!-- <p>Good morning!</p> -->
    <!-- <p>Our school trip</p> -->
  39. 39.📋 Which list suits a shopping list in any order? (a) <br> (b) <hr> (c) <ol> (d) <ul>
  40. 40.True or false: <meta> is an empty tag. (a) True (b) False

Answer key

  1. True
  2. 4
  3. <h1>
  4. 4
  5. </small>
  6. False
  7. Yes
  8. kite.png
  9. tags
  10. True
  11. A red kite
  12. </h2>
  13. <!DOCTYPE html>
  14. <
  15. to leave notes
  16. 1
  17. an opening tag
  18. 1
  19. line 2
  20. 400
  21. 250
  22. No
  23. 2
  24. -->
  25. <h6>
  26. </h1>
  27. </b>
  28. All about me
  29. 1
  30. </small>
  31. True
  32. 5
  33. 3
  34. line 1
  35. to describe the image
  36. <ol>
  37. starts a new line
  38. 3
  39. <ul>
  40. True

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