← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 417 · 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.True or false: <style> goes in the body. (a) False (b) True
  2. 2.🔠 Which heading shows the SMALLEST text: <h5>, <h4>, <h1> or <h2>? (a) <h4> (b) <h1> (c) <h2> (d) <h5>
  3. 3.Which of these goes in the body? (a) <style> (b) <link rel="stylesheet"> (c) <title> (d) <ul>
  4. 4.🔍 One closing tag is missing. Which one?
    <small>Cricket is fun.</small>
    <h1>Fun facts
    <p>My pets</p>
    (a) </h2> (b) </small> (c) </h1> (d) </p>
  5. 5.📝 How many paragraphs does this code make?
    <p>Our school trip</p>
    <p>My pets</p>
    <p>Cricket is fun.</p>
    <p>Our school trip</p>
    <p>I love mangoes.</p>
  6. 6.🔠 Which heading shows the SMALLEST text: <h6>, <h1>, <h5> or <h3>? (a) <h3> (b) <h5> (c) <h1> (d) <h6>
  7. 7.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <a> (d) <link>
  8. 8.🔢 In a basic web page file, which comes LAST? (a) </body> (b) <!DOCTYPE html> (c) </html> (d) <html>
  9. 9.🔍 Which is the odd one out? (a) colours code to help us (b) opens web pages for us (c) shows line numbers (d) saves our .html files
  10. 10.True or false: <ol> shows bullet points. (a) True (b) False
  11. 11.🔠 Which tag is the least important heading? (a) <h3> (b) <h6> (c) <h1> (d) <p>
  12. 12.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="350">
    (a) width (b) A happy dog (c) Birthday cake (d) cake.jpg
  13. 13.Which of these is an opening tag? (a) </p> (b) <p> (c) </title> (d) </body>
  14. 14.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the head (b) in the body
  15. 15.📋 Does this list show bullets or numbers?
    <ol>
      <li>Jamun</li>
      <li>Mango</li>
    </ol>
    (a) bullets (b) numbers
  16. 16.🔠 Which heading shows the SMALLEST text: <h4>, <h6>, <h5> or <h2>? (a) <h5> (b) <h4> (c) <h2> (d) <h6>
  17. 17.💬 Which text will NOT show on the page?
    <p>My best friend</p>
    <p>Rain today</p>
    <!-- <p>The red kite</p> -->
    <p>Cricket is fun.</p>
    (a) My best friend (b) Cricket is fun. (c) The red kite (d) Rain today
  18. 18.True or false: <ul> is an unordered list. (a) False (b) True
  19. 19.🔠 Which heading shows the BIGGEST text: <h4>, <h1>, <h6> or <h2>? (a) <h1> (b) <h6> (c) <h2> (d) <h4>
  20. 20.Which of these goes in the head? (a) <h1> (b) <img> (c) <ul> (d) <meta charset="utf-8">
  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) tiger.jpg (d) map.png
  22. 22.💬 How many paragraphs show on the page?
    <!-- <p>My best friend</p> -->
    <!-- <p>Our school trip</p> -->
    <!-- <p>Rain today</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
  23. 23.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Welcome!</h1>
      <p>Try this poha.</p>
    </body>
    </html>
    (a) Try this poha. (b) Riya’s Recipes (c) index.html (d) Welcome!
  24. 24.📝 Does <img> have a closing tag, or is it an empty tag? (a) has a closing tag (b) an empty tag
  25. 25.Which of these is an empty tag? (a) <meta> (b) <h1> (c) <title> (d) <ul>
  26. 26.💬 Which text will NOT show on the page?
    <p>Hello, world!</p>
    <p>Fun facts</p>
    <!-- <p>Our school trip</p> -->
    <p>My pets</p>
    (a) Fun facts (b) Hello, world! (c) My pets (d) Our school trip
  27. 27.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 4 (d) 3
  28. 28.🔤 In “HTML”, what does the L stand for? (a) Link (b) Laptop (c) Line (d) Language
  29. 29.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="cake.jpg" alt="Birthday cake" width="50">
    (a) Birthday cake (b) cake.jpg (c) width (d) A happy dog
  30. 30.📋 Which list tag lists things in any order? (a) <ol> (b) <li> (c) <ul>
  31. 31.🔗 Where does this link open?
    <a href="contact.html" target="_blank">Take the quiz</a>
    (a) in the same tab (b) in a new tab
  32. 32.🔠 Which heading shows the SMALLEST text: <h3>, <h1>, <h4> or <h6>? (a) <h1> (b) <h4> (c) <h6> (d) <h3>
  33. 33.🔗 Which address opens when you click this link?
    <a href="quiz.html">Maths fun</a>
    (a) about.html (b) quiz.html (c) Maths fun (d) games.html
  34. 34.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="150">
  35. 35.Which of these is true of a code editor? (a) hosts websites online (b) opens web pages for us (c) saves our .html files (d) answers page requests
  36. 36.True or false: HTML on its own can keep a high score. (a) True (b) False
  37. 37.🔍 One closing tag is missing. Which one?
    <h3>My best friend
    <em>I love mangoes.</em>
    <u>Hello, world!</u>
    (a) </u> (b) </b> (c) </h3> (d) </em>
  38. 38.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="400">
  39. 39.🖼️ How many pixels wide is the picture drawn?
    <img src="tiger.jpg" alt="A tiger asleep" width="200">
  40. 40.🔗 Which address opens when you click this link?
    <a href="about.html">Contact us</a>
    (a) about.html (b) contact.html (c) https://example.com (d) Contact us

Answer key

  1. False
  2. <h5>
  3. <ul>
  4. </h1>
  5. 5
  6. <h6>
  7. <a>
  8. </html>
  9. opens web pages for us
  10. False
  11. <h6>
  12. Birthday cake
  13. <p>
  14. in the head
  15. numbers
  16. <h6>
  17. The red kite
  18. True
  19. <h1>
  20. <meta charset="utf-8">
  21. tiger.jpg
  22. 1
  23. Riya’s Recipes
  24. an empty tag
  25. <meta>
  26. Our school trip
  27. 6
  28. Language
  29. Birthday cake
  30. <ul>
  31. in a new tab
  32. <h6>
  33. quiz.html
  34. 150
  35. saves our .html files
  36. False
  37. </h3>
  38. 400
  39. 200
  40. about.html

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