← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 109 · 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 many items does this list show?
    <ol>
      <li>Orange</li>
      <li>Guava</li>
      <li>Grapes</li>
    </ol>
  2. 2.🖼️ Which attribute of <img> describes the picture? (a) height (b) width (c) alt (d) src
  3. 3.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h4>? (a) <h1> (b) <h3> (c) <h5> (d) <h4>
  4. 4.💬 Which text will NOT show on the page?
    <!-- <p>My pets</p> -->
    <p>Good morning!</p>
    <p>Hello, world!</p>
    <p>Fun facts</p>
    (a) Fun facts (b) My pets (c) Good morning! (d) Hello, world!
  5. 5.🏷️ Which is the closing tag for <b>? (a) <b/> (b) <\b> (c) </b> (d) <b>
  6. 6.🔗 Which attribute holds the address of a link? (a) href (b) id (c) alt (d) src
  7. 7.Which of these is true of a web browser? (a) colours code to help us (b) shows line numbers (c) stores a website’s files (d) shows pages from the web
  8. 8.Which of these goes in the body? (a) <h1> (b) <title> (c) <meta charset="utf-8"> (d) <link rel="stylesheet">
  9. 9.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <p> (d) <ul>
  10. 10.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  11. 11.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h2> or <h6>? (a) <h5> (b) <h6> (c) <h2> (d) <h1>
  12. 12.🔤 In “HTML”, what does the L stand for? (a) Line (b) Link (c) Laptop (d) Language
  13. 13.Which of these is true of a web server? (a) opens web pages for us (b) stores a website’s files (c) colours code to help us (d) has an address bar
  14. 14.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h5> or <h6>? (a) <h6> (b) <h2> (c) <h5> (d) <h4>
  15. 15.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="200">
    (a) A red kite (b) Map of India (c) width (d) kite.png
  16. 16.📝 On how many lines does the browser show this paragraph?
    <p>Roses are red<br>Sky is blue<br>Kites fly high<br>Rivers flow<br>Birds sing</p>
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <h3>The red kite
    line 2: <h2>Hello, world!</h2>
    line 3: <i>My best friend</i>
    (a) line 3 (b) line 1 (c) line 2
  18. 18.💬 Which text will NOT show on the page?
    <p>Rain today</p>
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
    <p>My pets</p>
    (a) My pets (b) I love mangoes. (c) Our school trip (d) Rain today
  19. 19.🔗 Where does this link open?
    <a href="contact.html">Maths fun</a>
    (a) in a new tab (b) in the same tab
  20. 20.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Cricket is fun.</p>
    <p>My pets</p>
    <h2>Our school trip</h2>
    <p>Good morning!</p>
  21. 21.💬 Which text will NOT show on the page?
    <p>The red kite</p>
    <!-- <p>My pets</p> -->
    <p>Hello, world!</p>
    <p>Our school trip</p>
    (a) Hello, world! (b) Our school trip (c) The red kite (d) My pets
  22. 22.True or false: <table> goes in the body. (a) False (b) True
  23. 23.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  24. 24.📋 What number does the browser show next to “Grapes”?
    <ol start="2">
      <li>Mango</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Jamun</li>
      <li>Orange</li>
    </ol>
  25. 25.📋 Which list shows the steps of a recipe best? (a) <hr> (b) <ul> (c) <br> (d) <ol>
  26. 26.🔗 What does target="_blank" do to a link? (a) makes it bold (b) opens it in a new tab (c) hides the link (d) makes it blank
  27. 27.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Contact us</a>
    (a) in a new tab (b) in the same tab
  28. 28.🔍 One closing tag is missing. Which one?
    <small>Good morning!
    <u>I love mangoes.</u>
    <b>My pets</b>
    (a) </u> (b) </small> (c) </h3> (d) </b>
  29. 29.🔗 Which words do you click on?
    <a href="about.html">Play games</a>
    (a) About us (b) Play games (c) href (d) about.html
  30. 30.Which of these has a closing tag? (a) <img> (b) <meta> (c) <input> (d) <ul>
  31. 31.True or false: <ol> shows bullet points. (a) False (b) True
  32. 32.🖼️ Which attribute of <img> sets how wide it is? (a) alt (b) width (c) height (d) src
  33. 33.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) editor (d) attribute
  34. 34.🔗 Which words do you click on?
    <a href="maths.html">Take the quiz</a>
    (a) href (b) Play games (c) maths.html (d) Take the quiz
  35. 35.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to make links (d) to add colour
  36. 36.🖼️ Does <img> need a closing tag? (a) Yes (b) No
  37. 37.🔗 Which address opens when you click this link?
    <a href="https://example.com">Maths fun</a>
    (a) Maths fun (b) maths.html (c) https://example.com (d) art.html
  38. 38.📝 Does <li> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  39. 39.🔗 Where does this link open?
    <a href="art.html">Art corner</a>
    (a) in a new tab (b) in the same tab
  40. 40.🔍 Which is the odd one out? (a) has an address bar (b) shows pages from the web (c) sends pages over the net (d) opens web pages for us

Answer key

  1. 3
  2. alt
  3. <h5>
  4. My pets
  5. </b>
  6. href
  7. shows pages from the web
  8. <h1>
  9. <li>
  10. an opening tag
  11. <h6>
  12. Language
  13. stores a website’s files
  14. <h2>
  15. A red kite
  16. 5
  17. line 1
  18. I love mangoes.
  19. in the same tab
  20. 2
  21. My pets
  22. True
  23. an empty tag
  24. 3
  25. <ol>
  26. opens it in a new tab
  27. in a new tab
  28. </small>
  29. Play games
  30. <ul>
  31. False
  32. width
  33. element
  34. Take the quiz
  35. to leave notes
  36. No
  37. https://example.com
  38. has a closing tag
  39. in the same tab
  40. sends pages over the net

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