← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 183 · 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.💬 Why do coders write comments? (a) to make links (b) to leave notes (c) to add colour (d) to show pictures
  2. 2.🔗 Where does this link open?
    <a href="games.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  3. 3.📄 Can HTML on its own make headings? (a) No (b) Yes
  4. 4.📝 Does <hr> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  5. 5.🔠 Which heading shows the SMALLEST text: <h3>, <h5>, <h1> or <h4>? (a) <h1> (b) <h5> (c) <h3> (d) <h4>
  6. 6.📄 Can HTML on its own pick a random number? (a) No (b) Yes
  7. 7.🔠 Which heading shows the BIGGEST text: <h1>, <h5>, <h2> or <h4>? (a) <h2> (b) <h1> (c) <h5> (d) <h4>
  8. 8.🖼️ Which attribute of <img> tells which image to load? (a) alt (b) height (c) src (d) width
  9. 9.Which of these goes in the body? (a) <title> (b) <a> (c) <meta charset="utf-8"> (d) <link rel="stylesheet">
  10. 10.True or false: in <img>, alt names the picture file. (a) True (b) False
  11. 11.📝 On how many lines does the browser show this paragraph?
    <p>Stars shine<br>Kites fly high</p>
  12. 12.📋 How many items does this list show?
    <ul>
      <li>Mango</li>
      <li>Grapes</li>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Litchi</li>
    </ul>
  13. 13.📋 What number does the browser show next to “Guava”?
    <ol start="4">
      <li>Papaya</li>
      <li>Jamun</li>
      <li>Grapes</li>
      <li>Guava</li>
      <li>Banana</li>
      <li>Mango</li>
    </ol>
  14. 14.📋 What number does the browser show next to “Orange”?
    <ol>
      <li>Grapes</li>
      <li>Papaya</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Orange</li>
      <li>Jamun</li>
    </ol>
  15. 15.Which of these goes in the body? (a) <style> (b) <meta charset="utf-8"> (c) <h1> (d) <link rel="stylesheet">
  16. 16.Which of these has a closing tag? (a) <img> (b) <hr> (c) <input> (d) <b>
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <h3>Rain today
    line 2: <p>Hello, world!</p>
    line 3: <i>The red kite</i>
    (a) line 3 (b) line 1 (c) line 2
  18. 18.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <ol> (d) <br>
  19. 19.Which of these has a closing tag? (a) <meta> (b) <img> (c) <h1> (d) <br>
  20. 20.True or false: <ul> shows 1, 2, 3 numbers. (a) True (b) False
  21. 21.🖼️ Which picture file does the browser load?
    <img src="tiger.jpg" alt="A tiger asleep" width="50">
    (a) A tiger asleep (b) kite.png (c) map.png (d) tiger.jpg
  22. 22.Which of these is an opening tag? (a) </title> (b) <p> (c) </h1> (d) </p>
  23. 23.🔍 Which line is missing its closing tag?
    line 1: <h2>Fun facts</h2>
    line 2: <i>Rain today</i>
    line 3: <b>My pets
    (a) line 2 (b) line 3 (c) line 1
  24. 24.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <h2>Hello, world!</h2>
    <h2>Cricket is fun.</h2>
    <h2>Our school trip</h2>
  25. 25.🏷️ Is <p> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  26. 26.True or false: <p> is an empty tag. (a) True (b) False
  27. 27.Which of these is an empty tag? (a) <b> (b) <ul> (c) <hr> (d) <li>
  28. 28.💬 How many paragraphs show on the page?
    <p>Our school trip</p>
    <p>Hello, world!</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>My pets</p> -->
  29. 29.📋 Which tag goes around each item of a list? (a) <ul> (b) <li> (c) <ol> (d) <p>
  30. 30.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
    <p>Hello, world!</p>
    <p>Our school trip</p>
    (a) Our school trip (b) I love mangoes. (c) Cricket is fun. (d) Hello, world!
  31. 31.🏷️ Is </h1> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  32. 32.🔠 Which heading shows the BIGGEST text: <h1>, <h3>, <h4> or <h2>? (a) <h2> (b) <h4> (c) <h1> (d) <h3>
  33. 33.💬 How does an HTML comment end? (a) // (b) */ (c) >> (d) -->
  34. 34.🔗 Which words do you click on?
    <a href="quiz.html">About us</a>
    (a) quiz.html (b) href (c) About us (d) Contact us
  35. 35.🔠 Which heading shows the SMALLEST text: <h4>, <h1>, <h3> or <h6>? (a) <h4> (b) <h1> (c) <h3> (d) <h6>
  36. 36.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) A happy dog (b) Birthday cake (c) cake.jpg (d) width
  37. 37.🔗 Which attribute holds the address of a link? (a) id (b) href (c) src (d) alt
  38. 38.📝 How many paragraphs does this code make?
    <p>Hello, world!</p>
    <p>Our school trip</p>
    <p>Rain today</p>
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="kite.png" alt="A red kite" width="350">
    (a) A red kite (b) kite.png (c) width (d) Map of India
  40. 40.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="100">
    (a) Map of India (b) cake.jpg (c) map.png (d) dog.jpg

Answer key

  1. to leave notes
  2. in a new tab
  3. Yes
  4. an empty tag
  5. <h5>
  6. No
  7. <h1>
  8. src
  9. <a>
  10. False
  11. 2
  12. 6
  13. 7
  14. 5
  15. <h1>
  16. <b>
  17. line 1
  18. <ol>
  19. <h1>
  20. False
  21. tiger.jpg
  22. <p>
  23. line 3
  24. 1
  25. an opening tag
  26. False
  27. <hr>
  28. 2
  29. <li>
  30. Cricket is fun.
  31. a closing tag
  32. <h1>
  33. -->
  34. About us
  35. <h6>
  36. Birthday cake
  37. href
  38. 3
  39. A red kite
  40. map.png

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