← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 651 · 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.🔠 Which heading shows the SMALLEST text: <h5>, <h2>, <h4> or <h1>? (a) <h5> (b) <h1> (c) <h4> (d) <h2>
  2. 2.Which of these is an opening tag? (a) </p> (b) </li> (c) <title> (d) </title>
  3. 3.🧩 An opening tag + content + a closing tag together make an ___. (a) element (b) editor (c) attribute (d) address
  4. 4.True or false: <li> goes inside ul or ol. (a) False (b) True
  5. 5.🔠 Which tag is used for the main title on a page? (a) <br> (b) <h6> (c) <h1> (d) <p>
  6. 6.💬 Why do coders write comments? (a) to show pictures (b) to make links (c) to leave notes (d) to add colour
  7. 7.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h6> or <h1>? (a) <h1> (b) <h4> (c) <h2> (d) <h6>
  8. 8.🔠 Which heading shows the BIGGEST text: <h4>, <h5>, <h6> or <h2>? (a) <h2> (b) <h5> (c) <h4> (d) <h6>
  9. 9.🖼️ Which attribute of <img> names the picture file? (a) alt (b) src (c) width (d) height
  10. 10.True or false: <ol> is an ordered list. (a) False (b) True
  11. 11.🔗 Which words do you click on?
    <a href="news.html">Visit the site</a>
    (a) news.html (b) Visit the site (c) href (d) Maths fun
  12. 12.Which of these is a closing tag? (a) <title> (b) <body> (c) <b> (d) </b>
  13. 13.🖼️ Which attribute of <img> is read by screen readers? (a) height (b) alt (c) src (d) width
  14. 14.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <p>Fun facts</p>
    <h4>The red kite</h4>
    <p>I love mangoes.</p>
    <p>Hello, world!</p>
  15. 15.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Fun facts</p>
    <p>The red kite</p>
    <p>My pets</p>
  16. 16.🔍 One closing tag is missing. Which one?
    <p>My best friend</p>
    <h2>Fun facts</h2>
    <strong>Our school trip
    (a) </i> (b) </h2> (c) </p> (d) </strong>
  17. 17.📄 Can HTML on its own make bullet lists? (a) No (b) Yes
  18. 18.Which of these is an empty tag? (a) <title> (b) <p> (c) <b> (d) <input>
  19. 19.True or false: <ul> goes inside ul or ol. (a) False (b) True
  20. 20.📄 What is the big heading shown on this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Class 7 Blog</title>
    </head>
    <body>
      <h1>My drawings</h1>
      <p>I like to read.</p>
    </body>
    </html>
    (a) I like to read. (b) Class 7 Blog (c) My drawings (d) body
  21. 21.📋 What number does the browser show next to “Banana”?
    <ol start="7">
      <li>Papaya</li>
      <li>Grapes</li>
      <li>Banana</li>
    </ol>
  22. 22.📋 Which list shows the steps of a recipe best? (a) <ul> (b) <hr> (c) <br> (d) <ol>
  23. 23.Which of these is true of a web browser? (a) answers page requests (b) saves our .html files (c) shows line numbers (d) turns HTML into a page
  24. 24.🔢 In a basic web page file, which comes LAST? (a) <!DOCTYPE html> (b) </html> (c) <html> (d) <head>
  25. 25.🔗 Which words do you click on?
    <a href="news.html">Art corner</a>
    (a) href (b) news.html (c) School news (d) Art corner
  26. 26.🔢 In a basic web page file, which comes first: “</body>” or “<!DOCTYPE html>”? (a) <!DOCTYPE html> (b) </body>
  27. 27.📄 What is the first line of an HTML5 page? (a) <head> (b) <html> (c) <body> (d) <!DOCTYPE html>
  28. 28.Which of these is a closing tag? (a) <b> (b) <li> (c) <body> (d) </body>
  29. 29.💬 How does an HTML comment end? (a) */ (b) // (c) --> (d) >>
  30. 30.🔠 How many headings are in this code?
    <h1>Good morning!</h1>
    <p>Good morning!</p>
    <p>Good morning!</p>
    <h4>My pets</h4>
    <p>Good morning!</p>
  31. 31.📋 Which list tag lists things in any order? (a) <ul> (b) <li> (c) <ol>
  32. 32.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h4> or <h5>? (a) <h4> (b) <h1> (c) <h3> (d) <h5>
  33. 33.📋 How many items does this list show?
    <ul>
      <li>Guava</li>
      <li>Banana</li>
      <li>Grapes</li>
      <li>Papaya</li>
    </ul>
  34. 34.🖼️ 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) map.png (c) Birthday cake (d) width
  35. 35.🖼️ Which attribute of <img> sets how wide it is? (a) height (b) width (c) alt (d) src
  36. 36.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  37. 37.🔗 Which address opens when you click this link?
    <a href="contact.html">About us</a>
    (a) https://example.com (b) About us (c) maths.html (d) contact.html
  38. 38.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="moon.png" alt="The full moon" width="350">
    (a) moon.png (b) The full moon (c) width (d) Our school bus
  39. 39.🔗 Which attribute holds the address of a link? (a) alt (b) src (c) id (d) href
  40. 40.💬 How many paragraphs show on the page?
    <!-- <p>Good morning!</p> -->
    <!-- <p>My best friend</p> -->
    <p>Hello, world!</p>
    <p>Fun facts</p>

Answer key

  1. <h5>
  2. <title>
  3. element
  4. True
  5. <h1>
  6. to leave notes
  7. <h1>
  8. <h2>
  9. src
  10. True
  11. Visit the site
  12. </b>
  13. alt
  14. 2
  15. 1
  16. </strong>
  17. Yes
  18. <input>
  19. False
  20. My drawings
  21. 9
  22. <ol>
  23. turns HTML into a page
  24. </html>
  25. Art corner
  26. <!DOCTYPE html>
  27. <!DOCTYPE html>
  28. </body>
  29. -->
  30. 2
  31. <ul>
  32. <h5>
  33. 4
  34. Map of India
  35. width
  36. in the head
  37. contact.html
  38. The full moon
  39. href
  40. 2

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