← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 474 · 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 paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <p>My best friend</p>
    <p>Cricket is fun.</p>
    <p>My pets</p>
  2. 2.📄 Can HTML on its own make tables? (a) No (b) Yes
  3. 3.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="100">
    (a) Map of India (b) width (c) Birthday cake (d) map.png
  4. 4.💬 Does the browser show comments on the page? (a) Yes (b) No
  5. 5.True or false: HTML on its own can keep a high score. (a) True (b) False
  6. 6.🔢 In a basic web page file, which comes FIRST? (a) </html> (b) </head> (c) </body> (d) <!DOCTYPE html>
  7. 7.True or false: <p> has a closing tag. (a) True (b) False
  8. 8.🔗 Which words do you click on?
    <a href="contact.html">Visit the site</a>
    (a) Visit the site (b) Maths fun (c) href (d) contact.html
  9. 9.📋 How many items does this list show?
    <ul>
      <li>Litchi</li>
      <li>Mango</li>
      <li>Guava</li>
      <li>Grapes</li>
      <li>Banana</li>
      <li>Papaya</li>
    </ul>
  10. 10.True or false: <img> has a closing tag. (a) False (b) True
  11. 11.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Art corner</a>
    (a) in the same tab (b) in a new tab
  12. 12.🖼️ Which attribute of <img> tells which image to load? (a) src (b) width (c) alt (d) height
  13. 13.🔤 In “HTML”, what does the L stand for? (a) Laptop (b) Language (c) Line (d) Link
  14. 14.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="50">
    (a) cake.jpg (b) map.png (c) dog.jpg (d) Map of India
  15. 15.🔠 Which heading shows the SMALLEST text: <h4>, <h3>, <h1> or <h2>? (a) <h3> (b) <h1> (c) <h2> (d) <h4>
  16. 16.🔠 Which heading shows the BIGGEST text: <h6>, <h3>, <h5> or <h1>? (a) <h6> (b) <h5> (c) <h1> (d) <h3>
  17. 17.🔍 Which line is missing its closing tag?
    line 1: <u>Hello, world!</u>
    line 2: <i>I love mangoes.
    line 3: <small>Our school trip</small>
    (a) line 3 (b) line 1 (c) line 2
  18. 18.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="400">
  19. 19.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Planets (c) body (d) Mars is red.
  20. 20.💬 Which text will NOT show on the page?
    <p>Cricket is fun.</p>
    <p>I love mangoes.</p>
    <!-- <p>Our school trip</p> -->
    <p>Fun facts</p>
    (a) I love mangoes. (b) Fun facts (c) Cricket is fun. (d) Our school trip
  21. 21.Which of these is true of a web browser? (a) is where we type code (b) colours code to help us (c) shows line numbers (d) opens web pages for us
  22. 22.📝 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>Stars shine</p>
  23. 23.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h5> or <h2>? (a) <h5> (b) <h2> (c) <h6> (d) <h1>
  24. 24.🔍 Which line is missing its closing tag?
    line 1: <strong>The red kite</strong>
    line 2: <p>Fun facts</p>
    line 3: <h3>My best friend
    (a) line 3 (b) line 1 (c) line 2
  25. 25.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Fun facts</p> -->
    <!-- <p>Cricket is fun.</p> -->
  26. 26.🖼️ Which picture file does the browser load?
    <img src="cake.jpg" alt="Birthday cake" width="150">
    (a) cake.jpg (b) Birthday cake (c) dog.jpg (d) moon.png
  27. 27.True or false: <ol> is an ordered list. (a) True (b) False
  28. 28.Which of these has a closing tag? (a) <input> (b) <br> (c) <li> (d) <img>
  29. 29.💬 Why do coders write comments? (a) to show pictures (b) to leave notes (c) to add colour (d) to make links
  30. 30.📋 What number does the browser show next to “Orange”?
    <ol start="3">
      <li>Grapes</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Banana</li>
    </ol>
  31. 31.🔠 Which heading shows the BIGGEST text: <h5>, <h2>, <h1> or <h6>? (a) <h6> (b) <h2> (c) <h1> (d) <h5>
  32. 32.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Litchi</li>
      <li>Guava</li>
      <li>Mango</li>
    </ol>
  33. 33.Which of these is a closing tag? (a) <body> (b) <h1> (c) <li> (d) </h1>
  34. 34.📋 Which list tag lists steps in order? (a) <li> (b) <ol> (c) <ul>
  35. 35.True or false: in <img>, width is read by screen readers. (a) True (b) False
  36. 36.True or false: HTML on its own cannot count button clicks. (a) True (b) False
  37. 37.📝 Does <meta> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  38. 38.🏷️ Is <title> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  39. 39.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Sky is blue<br>Kites fly high</p>
  40. 40.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) width (b) dog.jpg (c) A happy dog (d) The full moon

Answer key

  1. 3
  2. Yes
  3. Map of India
  4. No
  5. False
  6. <!DOCTYPE html>
  7. True
  8. Visit the site
  9. 6
  10. False
  11. in a new tab
  12. src
  13. Language
  14. map.png
  15. <h4>
  16. <h1>
  17. line 2
  18. 400
  19. Planets
  20. Our school trip
  21. opens web pages for us
  22. 5
  23. <h1>
  24. line 3
  25. 1
  26. cake.jpg
  27. True
  28. <li>
  29. to leave notes
  30. 4
  31. <h1>
  32. 4
  33. </h1>
  34. <ol>
  35. False
  36. True
  37. an empty tag
  38. an opening tag
  39. 3
  40. A happy dog

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