← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 960 · 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.📄 Where does <meta charset="utf-8"> go: in the head or in the body? (a) in the body (b) in the head
  2. 2.🔍 Which line is missing its closing tag?
    line 1: <h1>Hello, world!</h1>
    line 2: <h2>Rain today
    line 3: <p>Cricket is fun.</p>
    (a) line 1 (b) line 2 (c) line 3
  3. 3.📋 What number does the browser show next to “Jamun”?
    <ol start="3">
      <li>Litchi</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Jamun</li>
      <li>Guava</li>
    </ol>
  4. 4.📋 What number does the browser show next to “Banana”?
    <ol>
      <li>Jamun</li>
      <li>Banana</li>
      <li>Orange</li>
      <li>Papaya</li>
      <li>Grapes</li>
    </ol>
  5. 5.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>My best friend</p>
    <p>My pets</p>
  6. 6.🔠 Which tag is used for the main title on a page? (a) <p> (b) <h6> (c) <br> (d) <h1>
  7. 7.📋 What number does the browser show next to “Grapes”?
    <ol>
      <li>Mango</li>
      <li>Orange</li>
      <li>Grapes</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ol>
  8. 8.💬 Which text will NOT show on the page?
    <!-- <p>Rain today</p> -->
    <p>The red kite</p>
    <p>Good morning!</p>
    (a) Good morning! (b) Rain today (c) The red kite
  9. 9.🔗 Which words do you click on?
    <a href="art.html">Maths fun</a>
    (a) art.html (b) Maths fun (c) href (d) Art corner
  10. 10.🖼️ How many pixels wide is the picture drawn?
    <img src="dog.jpg" alt="A happy dog" width="400">
  11. 11.📋 How many items does this list show?
    <ol>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Orange</li>
      <li>Guava</li>
    </ol>
  12. 12.📝 How many paragraphs does this code make?
    <p>Cricket is fun.</p>
    <p>Good morning!</p>
    <h2>Rain today</h2>
  13. 13.True or false: in <img>, alt shows if the image fails. (a) True (b) False
  14. 14.🖼️ The picture cannot load. Which text does the browser show instead?
    <img src="map.png" alt="Map of India" width="50">
    (a) map.png (b) width (c) Map of India (d) Birthday cake
  15. 15.🔠 How many headings are in this code?
    <h1>My pets</h1>
    <h2>Good morning!</h2>
    <p>Our school trip</p>
    <p>Rain today</p>
  16. 16.True or false: <title> has a closing tag. (a) True (b) False
  17. 17.💬 Which text will NOT show on the page?
    <!-- <p>Good morning!</p> -->
    <p>Cricket is fun.</p>
    <p>Fun facts</p>
    (a) Good morning! (b) Fun facts (c) Cricket is fun.
  18. 18.Which of these goes in the head? (a) <table> (b) <a> (c) <h1> (d) <meta charset="utf-8">
  19. 19.📋 Does this list show bullets or numbers?
    <ul>
      <li>Jamun</li>
      <li>Papaya</li>
      <li>Mango</li>
    </ul>
    (a) bullets (b) numbers
  20. 20.True or false: HTML on its own can run a game loop. (a) True (b) False
  21. 21.🔗 Which words do you click on?
    <a href="news.html">Contact us</a>
    (a) Contact us (b) href (c) news.html (d) Visit the site
  22. 22.🔠 Which heading shows the SMALLEST text: <h3>, <h2>, <h4> or <h1>? (a) <h1> (b) <h4> (c) <h2> (d) <h3>
  23. 23.🔗 Which tag makes a clickable link? (a) <p> (b) <img> (c) <link> (d) <a>
  24. 24.True or false: in <img>, src tells which image to load. (a) False (b) True
  25. 25.🔠 How many headings are in this code?
    <h1>Fun facts</h1>
    <p>I love mangoes.</p>
    <h3>My best friend</h3>
  26. 26.True or false: HTML on its own cannot keep a high score. (a) True (b) False
  27. 27.🔠 How many heading levels does HTML have? (a) 6 (b) 10 (c) 4 (d) 3
  28. 28.📋 Which list tag lists things in any order? (a) <ul> (b) <ol> (c) <li>
  29. 29.Which of these is a closing tag? (a) <body> (b) <h1> (c) <title> (d) </body>
  30. 30.True or false: <p> goes in the head. (a) True (b) False
  31. 31.Which of these is a closing tag? (a) <b> (b) <body> (c) </li> (d) <li>
  32. 32.📄 What does the browser tab show for this page?
    <!DOCTYPE html>
    <html>
    <head>
      <title>Riya’s Recipes</title>
    </head>
    <body>
      <h1>Planets</h1>
      <p>Mars is red.</p>
    </body>
    </html>
    (a) Riya’s Recipes (b) index.html (c) Planets (d) Mars is red.
  33. 33.🔠 Which heading shows the BIGGEST text: <h2>, <h4>, <h6> or <h3>? (a) <h6> (b) <h3> (c) <h4> (d) <h2>
  34. 34.Which of these is an opening tag? (a) </li> (b) </b> (c) </h1> (d) <h1>
  35. 35.🔍 One closing tag is missing. Which one?
    <em>My pets</em>
    <i>Cricket is fun.
    <p>Good morning!</p>
    (a) </h3> (b) </i> (c) </p> (d) </em>
  36. 36.💬 How does an HTML comment start? (a) /* (b) <!-- (c) # (d) //
  37. 37.🔠 Which heading shows the SMALLEST text: <h1>, <h3>, <h4> or <h2>? (a) <h1> (b) <h3> (c) <h2> (d) <h4>
  38. 38.🔗 Which code links to about.html? (a) <a src="about.html"> (b) <a href="about.html"> (c) <link about.html> (d) <a alt="about.html">
  39. 39.📋 How many items does this list show?
    <ul>
      <li>Grapes</li>
      <li>Banana</li>
    </ul>
  40. 40.🔗 What does target="_blank" do to a link? (a) makes it blank (b) hides the link (c) makes it bold (d) opens it in a new tab

Answer key

  1. in the head
  2. line 2
  3. 6
  4. 2
  5. 1
  6. <h1>
  7. 3
  8. Rain today
  9. Maths fun
  10. 400
  11. 4
  12. 2
  13. True
  14. Map of India
  15. 2
  16. True
  17. Good morning!
  18. <meta charset="utf-8">
  19. bullets
  20. False
  21. Contact us
  22. <h4>
  23. <a>
  24. True
  25. 2
  26. True
  27. 6
  28. <ul>
  29. </body>
  30. False
  31. </li>
  32. Riya’s Recipes
  33. <h2>
  34. <h1>
  35. </i>
  36. <!--
  37. <h4>
  38. <a href="about.html">
  39. 2
  40. opens it in a new tab

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