← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 826 · 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 does an HTML comment start? (a) <!-- (b) # (c) /* (d) //
  2. 2.True or false: <b> has a closing tag. (a) True (b) False
  3. 3.🔍 Which line is missing its closing tag?
    line 1: <strong>My pets
    line 2: <h3>Fun facts</h3>
    line 3: <h1>The red kite</h1>
    (a) line 3 (b) line 2 (c) line 1
  4. 4.🔗 Which address opens when you click this link?
    <a href="quiz.html">About us</a>
    (a) about.html (b) quiz.html (c) About us (d) games.html
  5. 5.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
  6. 6.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Thanks for visiting.</p>
    </body>
    </html>
    (a) Class 7 Blog (b) Thanks for visiting. (c) Planets (d) body
  7. 7.🔠 Which heading shows the SMALLEST text: <h6>, <h5>, <h2> or <h1>? (a) <h5> (b) <h2> (c) <h1> (d) <h6>
  8. 8.🖼️ Which picture file does the browser load?
    <img src="dog.jpg" alt="A happy dog" width="100">
    (a) moon.png (b) A happy dog (c) dog.jpg (d) bus.jpg
  9. 9.🔍 Which is the odd one out? (a) shows line numbers (b) is where we type code (c) hosts websites online (d) saves our .html files
  10. 10.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Here is my best one.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) index.html (c) Welcome! (d) Here is my best one.
  11. 11.🔠 Which tag is used for the main title on a page? (a) <h1> (b) <p> (c) <br> (d) <h6>
  12. 12.🔠 How many headings are in this code?
    <h1>My best friend</h1>
    <p>I love mangoes.</p>
    <h3>Fun facts</h3>
    <p>Fun facts</p>
  13. 13.True or false: in <img>, height describes the picture. (a) True (b) False
  14. 14.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) src (c) width (d) alt
  15. 15.True or false: <meta charset="utf-8"> goes in the body. (a) False (b) True
  16. 16.🖼️ Which tag puts a picture on a page? (a) <pic> (b) <a> (c) <p> (d) <img>
  17. 17.🔗 Where does this link open?
    <a href="art.html" target="_blank">Contact us</a>
    (a) in the same tab (b) in a new tab
  18. 18.True or false: <li> is an unordered list. (a) True (b) False
  19. 19.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  20. 20.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <p>My pets</p>
    <p>Rain today</p>
    <p>Cricket is fun.</p>
  21. 21.Which of these goes in the head? (a) <img> (b) <a> (c) <style> (d) <ul>
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <!-- <p>I love mangoes.</p> -->
    <p>Hello, world!</p>
  23. 23.🔍 Which line is missing its closing tag?
    line 1: <p>Fun facts
    line 2: <small>My pets</small>
    line 3: <strong>My best friend</strong>
    (a) line 1 (b) line 3 (c) line 2
  24. 24.🧩 An opening tag + content + a closing tag together make an ___. (a) address (b) element (c) editor (d) attribute
  25. 25.📋 Does this list show bullets or numbers?
    <ul>
      <li>Mango</li>
      <li>Grapes</li>
    </ul>
    (a) numbers (b) bullets
  26. 26.📋 Does this list show bullets or numbers?
    <ol>
      <li>Papaya</li>
      <li>Litchi</li>
    </ol>
    (a) bullets (b) numbers
  27. 27.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h5> or <h2>? (a) <h5> (b) <h4> (c) <h2> (d) <h6>
  28. 28.💬 Which text will NOT show on the page?
    <p>My pets</p>
    <p>Fun facts</p>
    <!-- <p>I love mangoes.</p> -->
    (a) My pets (b) Fun facts (c) I love mangoes.
  29. 29.Which of these is an opening tag? (a) </title> (b) <li> (c) </b> (d) </body>
  30. 30.🔠 Which heading shows the SMALLEST text: <h2>, <h6>, <h1> or <h3>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>
  31. 31.💬 How does an HTML comment end? (a) */ (b) // (c) >> (d) -->
  32. 32.🔠 Which heading shows the BIGGEST text: <h4>, <h6>, <h3> or <h5>? (a) <h3> (b) <h6> (c) <h5> (d) <h4>
  33. 33.🖼️ Which picture file does the browser load?
    <img src="bus.jpg" alt="Our school bus" width="50">
    (a) fort.jpg (b) tiger.jpg (c) Our school bus (d) bus.jpg
  34. 34.True or false: <title> has a closing tag. (a) True (b) False
  35. 35.🔍 One closing tag is missing. Which one?
    <small>Hello, world!</small>
    <strong>Our school trip
    <b>Cricket is fun.</b>
    (a) </u> (b) </b> (c) </small> (d) </strong>
  36. 36.🔗 What does HyperText mean? (a) secret text (b) text with links (c) very big text (d) text in colour
  37. 37.🏷️ Which is the closing tag for <h3>? (a) <h3/> (b) </h3> (c) <\h3> (d) <h3>
  38. 38.🖼️ Which attribute of <img> sets how wide it is? (a) src (b) width (c) height (d) alt
  39. 39.🏷️ Is </li> an opening tag or a closing tag? (a) a closing tag (b) an opening tag
  40. 40.🔠 Which heading shows the BIGGEST text: <h6>, <h2>, <h1> or <h3>? (a) <h2> (b) <h1> (c) <h6> (d) <h3>

Answer key

  1. <!--
  2. True
  3. line 1
  4. quiz.html
  5. <a>
  6. Planets
  7. <h6>
  8. dog.jpg
  9. hosts websites online
  10. Riya’s Recipes
  11. <h1>
  12. 2
  13. False
  14. alt
  15. False
  16. <img>
  17. in a new tab
  18. False
  19. in the head
  20. 3
  21. <style>
  22. 1
  23. line 1
  24. element
  25. bullets
  26. numbers
  27. <h6>
  28. I love mangoes.
  29. <li>
  30. <h6>
  31. -->
  32. <h3>
  33. bus.jpg
  34. True
  35. </strong>
  36. text with links
  37. </h3>
  38. width
  39. a closing tag
  40. <h1>

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