← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 23 · 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.🏷️ Is <h1> an opening tag or a closing tag? (a) an opening tag (b) a closing tag
  2. 2.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h2> or <h1>? (a) <h1> (b) <h2> (c) <h4> (d) <h6>
  3. 3.💬 How many paragraphs show on the page?
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Rain today</p> -->
    <p>The red kite</p>
  4. 4.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="50">
  5. 5.📝 Does <p> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  6. 6.📋 Does this list show bullets or numbers?
    <ul>
      <li>Guava</li>
      <li>Grapes</li>
    </ul>
    (a) bullets (b) numbers
  7. 7.True or false: HTML on its own cannot make a form. (a) True (b) False
  8. 8.True or false: a code editor is where we type code. (a) False (b) True
  9. 9.🔍 One closing tag is missing. Which one?
    <u>Good morning!
    <strong>Cricket is fun.</strong>
    <em>My pets</em>
    (a) </h1> (b) </strong> (c) </u> (d) </em>
  10. 10.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>All about me</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Thanks for visiting. (b) Class 7 Blog (c) All about me (d) index.html
  11. 11.🔍 One closing tag is missing. Which one?
    <strong>Fun facts
    <b>My pets</b>
    <h2>My best friend</h2>
    (a) </h3> (b) </h2> (c) </b> (d) </strong>
  12. 12.🔢 In a basic web page file, which comes FIRST? (a) <!DOCTYPE html> (b) <body> (c) <head> (d) </html>
  13. 13.📝 On how many lines does the browser show this paragraph?
    <p>Birds sing<br>Kites fly high</p>
  14. 14.💬 How many paragraphs show on the page?
    <!-- <p>The red kite</p> -->
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
  15. 15.True or false: <link rel="stylesheet"> goes in the body. (a) True (b) False
  16. 16.📝 How many paragraphs does this code make?
    <p>My pets</p>
    <h2>My pets</h2>
    <h2>My best friend</h2>
    <h2>I love mangoes.</h2>
  17. 17.💬 How many paragraphs show on the page?
    <!-- <p>Our school trip</p> -->
    <!-- <p>The red kite</p> -->
    <!-- <p>Hello, world!</p> -->
    <p>Fun facts</p>
    <p>Cricket is fun.</p>
  18. 18.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="dog.jpg" alt="A happy dog" width="350">
    (a) dog.jpg (b) The full moon (c) width (d) A happy dog
  19. 19.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <br> (c) <ol> (d) <hr>
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Our school trip</p>
    <!-- <p>I love mangoes.</p> -->
  21. 21.True or false: <title> goes in the head. (a) False (b) True
  22. 22.🔗 Which words do you click on?
    <a href="contact.html">Take the quiz</a>
    (a) Take the quiz (b) contact.html (c) Play games (d) href
  23. 23.🏷️ Is </b> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  24. 24.🔍 Which is the odd one out? (a) turns HTML into a page (b) opens web pages for us (c) saves our .html files (d) shows pages from the web
  25. 25.🏷️ Which is the closing tag for <strong>? (a) <strong> (b) <\strong> (c) <strong/> (d) </strong>
  26. 26.🧱 HTML gives a web page its ___. (a) sound (b) structure (c) speed (d) colours
  27. 27.🔠 Which heading shows the SMALLEST text: <h5>, <h1>, <h4> or <h3>? (a) <h4> (b) <h3> (c) <h5> (d) <h1>
  28. 28.🖼️ Which picture file does the browser load?
    <img src="map.png" alt="Map of India" width="350">
    (a) cake.jpg (b) map.png (c) Map of India (d) dog.jpg
  29. 29.True or false: <title> goes in the body. (a) True (b) False
  30. 30.🔍 One closing tag is missing. Which one?
    <h2>Cricket is fun.
    <strong>Fun facts</strong>
    <small>Good morning!</small>
    (a) </small> (b) </em> (c) </h2> (d) </strong>
  31. 31.True or false: <meta> has a closing tag. (a) False (b) True
  32. 32.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Rain today</p>
    <!-- <p>My pets</p> -->
  33. 33.🖼️ Why do we add alt text to an image? (a) to load it faster (b) to colour it (c) to make it bigger (d) to describe the image
  34. 34.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="250">
  35. 35.📋 Which list tag shows bullet points? (a) <ol> (b) <ul> (c) <li>
  36. 36.True or false: a web server sends pages over the net. (a) True (b) False
  37. 37.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="100">
    (a) Our school bus (b) The full moon (c) moon.png (d) width
  38. 38.Which of these has a closing tag? (a) <meta> (b) <hr> (c) <input> (d) <li>
  39. 39.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="400">
    (a) moon.png (b) width (c) Our school bus (d) The full moon
  40. 40.🖼️ Which attribute of <img> is read by screen readers? (a) alt (b) src (c) width (d) height

Answer key

  1. an opening tag
  2. <h6>
  3. 1
  4. 50
  5. has a closing tag
  6. bullets
  7. False
  8. True
  9. </u>
  10. Class 7 Blog
  11. </strong>
  12. <!DOCTYPE html>
  13. 2
  14. 2
  15. False
  16. 1
  17. 2
  18. A happy dog
  19. <ol>
  20. 1
  21. True
  22. Take the quiz
  23. a closing tag
  24. saves our .html files
  25. </strong>
  26. structure
  27. <h5>
  28. map.png
  29. False
  30. </h2>
  31. False
  32. 1
  33. to describe the image
  34. 250
  35. <ul>
  36. True
  37. The full moon
  38. <li>
  39. The full moon
  40. alt

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