← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 621 · 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.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  2. 2.🔗 Where does this link open?
    <a href="quiz.html">About us</a>
    (a) in a new tab (b) in the same tab
  3. 3.Which of these is a closing tag? (a) <li> (b) <h1> (c) </p> (d) <p>
  4. 4.True or false: <img> goes in the body. (a) True (b) False
  5. 5.🔗 Which words do you click on?
    <a href="quiz.html">Play games</a>
    (a) quiz.html (b) About us (c) Play games (d) href
  6. 6.🔍 Which is the odd one out? (a) saves our .html files (b) shows line numbers (c) colours code to help us (d) stores a website’s files
  7. 7.📄 Can HTML on its own make links to pages? (a) Yes (b) No
  8. 8.🔗 Which words do you click on?
    <a href="quiz.html">School news</a>
    (a) quiz.html (b) Take the quiz (c) href (d) School news
  9. 9.📝 On how many lines does the browser show this paragraph?
    <p>Sky is blue<br>Birds sing<br>Roses are red<br>Stars shine<br>Kites fly high</p>
  10. 10.📛 In <a href="x.html">, what is href? (a) a closing tag (b) an element name (c) a comment (d) an attribute
  11. 11.True or false: <link rel="stylesheet"> goes in the body. (a) False (b) True
  12. 12.🔗 Where does this link open?
    <a href="news.html" target="_blank">Play games</a>
    (a) in a new tab (b) in the same tab
  13. 13.🔍 One closing tag is missing. Which one?
    <b>I love mangoes.</b>
    <h2>My pets</h2>
    <h3>Our school trip
    (a) </h3> (b) </b> (c) </h2> (d) </em>
  14. 14.🔠 Which heading shows the SMALLEST text: <h2>, <h1>, <h5> or <h3>? (a) <h1> (b) <h3> (c) <h5> (d) <h2>
  15. 15.🔗 Where does this link open?
    <a href="games.html" target="_blank">About us</a>
    (a) in a new tab (b) in the same tab
  16. 16.📄 Where does the text of <title> appear? (a) at the bottom (b) nowhere (c) on the browser tab (d) in a big heading
  17. 17.📄 Where does <ul> go: in the head or in the body? (a) in the head (b) in the body
  18. 18.🔗 Which words do you click on?
    <a href="maths.html">Maths fun</a>
    (a) Art corner (b) href (c) Maths fun (d) maths.html
  19. 19.📋 What number does the browser show next to “Papaya”?
    <ol start="5">
      <li>Mango</li>
      <li>Orange</li>
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
  20. 20.🔍 Which is the odd one out? (a) has an address bar (b) colours code to help us (c) turns HTML into a page (d) opens web pages for us
  21. 21.🔠 Which heading shows the BIGGEST text: <h3>, <h5>, <h1> or <h4>? (a) <h3> (b) <h5> (c) <h4> (d) <h1>
  22. 22.💬 How many paragraphs show on the page?
    <p>The red kite</p>
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
    <p>Cricket is fun.</p>
    <p>My best friend</p>
  23. 23.True or false: in <img>, height sets how tall it is. (a) False (b) True
  24. 24.🔠 How many headings are in this code?
    <h1>I love mangoes.</h1>
    <h2>Rain today</h2>
    <p>My pets</p>
    <p>The red kite</p>
  25. 25.True or false: a code editor shows pages from the web. (a) True (b) False
  26. 26.🖼️ Which picture file does the browser load?
    <img src="kite.png" alt="A red kite" width="50">
    (a) kite.png (b) A red kite (c) map.png (d) cake.jpg
  27. 27.True or false: <h1> is an empty tag. (a) True (b) False
  28. 28.🔠 Which heading shows the BIGGEST text: <h5>, <h3>, <h1> or <h2>? (a) <h2> (b) <h3> (c) <h5> (d) <h1>
  29. 29.🔢 In a basic web page file, which comes first: “<head>” or “<!DOCTYPE html>”? (a) <head> (b) <!DOCTYPE html>
  30. 30.📄 Can HTML on its own count button clicks? (a) No (b) Yes
  31. 31.📝 On how many lines does the browser show this paragraph?
    <p>Kites fly high<br>Rivers flow<br>Sky is blue<br>Roses are red</p>
  32. 32.📋 Does this list show bullets or numbers?
    <ol>
      <li>Guava</li>
      <li>Litchi</li>
      <li>Orange</li>
    </ol>
    (a) bullets (b) numbers
  33. 33.True or false: HTML on its own cannot keep a high score. (a) True (b) False
  34. 34.🏷️ Which is the closing tag for <u>? (a) <u> (b) <\u> (c) </u> (d) <u/>
  35. 35.📋 Which list tag is one item of a list? (a) <ol> (b) <ul> (c) <li>
  36. 36.🔗 Which words do you click on?
    <a href="maths.html">About us</a>
    (a) About us (b) href (c) Contact us (d) maths.html
  37. 37.🖼️ Why do we add alt text to an image? (a) to make it bigger (b) to describe the image (c) to load it faster (d) to colour it
  38. 38.True or false: HTML on its own can pick a random number. (a) False (b) True
  39. 39.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Papaya</li>
      <li>Guava</li>
    </ul>
  40. 40.Which of these goes in the body? (a) <title> (b) <meta charset="utf-8"> (c) <img> (d) <style>

Answer key

  1. No
  2. in the same tab
  3. </p>
  4. True
  5. Play games
  6. stores a website’s files
  7. Yes
  8. School news
  9. 5
  10. an attribute
  11. False
  12. in a new tab
  13. </h3>
  14. <h5>
  15. in a new tab
  16. on the browser tab
  17. in the body
  18. Maths fun
  19. 8
  20. colours code to help us
  21. <h1>
  22. 4
  23. True
  24. 2
  25. False
  26. kite.png
  27. False
  28. <h1>
  29. <!DOCTYPE html>
  30. No
  31. 4
  32. numbers
  33. True
  34. </u>
  35. <li>
  36. About us
  37. to describe the image
  38. False
  39. 3
  40. <img>

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