← HTML basics test lesson New set →

HTML Worksheet: Practice Test

HTML and CSS lesson 10: HTML basics test · Set 321 · 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 many headings are in this code?
    <h1>The red kite</h1>
    <p>Cricket is fun.</p>
    <p>Rain today</p>
    <p>Fun facts</p>
  2. 2.Which of these is an empty tag? (a) <li> (b) <hr> (c) <h1> (d) <p>
  3. 3.📄 Can HTML on its own run a game loop? (a) Yes (b) No
  4. 4.📝 Does <b> have a closing tag, or is it an empty tag? (a) an empty tag (b) has a closing tag
  5. 5.💬 How many paragraphs show on the page?
    <!-- <p>My pets</p> -->
    <p>I love mangoes.</p>
    <!-- <p>Cricket is fun.</p> -->
    <!-- <p>Hello, world!</p> -->
  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>We won by 5 runs.</p>
    </body>
    </html>
    (a) body (b) We won by 5 runs. (c) Class 7 Blog (d) Planets
  7. 7.🔡 Are HTML tag names usually written in small letters? (a) Yes (b) No
  8. 8.📋 Does this list show bullets or numbers?
    <ul>
      <li>Litchi</li>
      <li>Banana</li>
    </ul>
    (a) bullets (b) numbers
  9. 9.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Maths fun</a>
    (a) in a new tab (b) in the same tab
  10. 10.🔍 One closing tag is missing. Which one?
    <em>Good morning!
    <p>My pets</p>
    <h3>Hello, world!</h3>
    (a) </h3> (b) </h2> (c) </p> (d) </em>
  11. 11.💬 Which text will NOT show on the page?
    <p>Fun facts</p>
    <!-- <p>The red kite</p> -->
    <p>My pets</p>
    (a) Fun facts (b) My pets (c) The red kite
  12. 12.True or false: in <img>, src tells which image to load. (a) False (b) True
  13. 13.Which of these goes in the head? (a) <p> (b) <ul> (c) <a> (d) <link rel="stylesheet">
  14. 14.🔗 Which words do you click on?
    <a href="https://example.com">Play games</a>
    (a) https://example.com (b) About us (c) href (d) Play games
  15. 15.True or false: HTML on its own cannot show paragraphs. (a) True (b) False
  16. 16.🖼️ Which attribute of <img> shows if the image fails? (a) width (b) src (c) height (d) alt
  17. 17.🔗 Which address opens when you click this link?
    <a href="maths.html">Art corner</a>
    (a) Art corner (b) news.html (c) maths.html (d) art.html
  18. 18.📋 Which tag goes around each item of a list? (a) <ol> (b) <li> (c) <ul> (d) <p>
  19. 19.📋 Which list tag shows bullet points? (a) <ol> (b) <li> (c) <ul>
  20. 20.🔍 One closing tag is missing. Which one?
    <i>I love mangoes.
    <em>Hello, world!</em>
    <p>Rain today</p>
    (a) </p> (b) </u> (c) </i> (d) </em>
  21. 21.💬 Which text will NOT show on the page?
    <p>I love mangoes.</p>
    <!-- <p>Rain today</p> -->
    <p>My best friend</p>
    (a) Rain today (b) I love mangoes. (c) My best friend
  22. 22.💬 How many paragraphs show on the page?
    <p>Cricket is fun.</p>
    <p>Hello, world!</p>
    <p>I love mangoes.</p>
    <p>Fun facts</p>
    <!-- <p>Rain today</p> -->
  23. 23.📄 Where does <style> go: in the head or in the body? (a) in the body (b) in the head
  24. 24.True or false: <ul> goes in the body. (a) True (b) False
  25. 25.📋 What number does the browser show next to “Papaya”?
    <ol>
      <li>Banana</li>
      <li>Guava</li>
      <li>Papaya</li>
    </ol>
  26. 26.🔍 One closing tag is missing. Which one?
    <h2>I love mangoes.</h2>
    <p>My pets
    <h3>Good morning!</h3>
    (a) </h2> (b) </p> (c) </h3> (d) </b>
  27. 27.🏷️ Which is the closing tag for <small>? (a) <\small> (b) </small> (c) <small/> (d) <small>
  28. 28.True or false: in <img>, height sets how wide it is. (a) True (b) False
  29. 29.🔤 In “HTML”, what do the letters HT stand for? (a) Home Text (b) High Tech (c) Hot Tags (d) HyperText
  30. 30.🔗 Where does this link open?
    <a href="maths.html" target="_blank">Art corner</a>
    (a) in a new tab (b) in the same tab
  31. 31.📄 Can HTML on its own make headings? (a) No (b) Yes
  32. 32.🖼️ Why do we add alt text to an image? (a) to colour it (b) to describe the image (c) to load it faster (d) to make it bigger
  33. 33.🖼️ How many pixels wide is the picture drawn?
    <img src="cake.jpg" alt="Birthday cake" width="150">
  34. 34.Which of these is an opening tag? (a) <body> (b) </p> (c) </title> (d) </li>
  35. 35.🖼️ How many pixels wide is the picture drawn?
    <img src="fort.jpg" alt="An old fort" width="350">
  36. 36.🔠 Which heading shows the BIGGEST text: <h6>, <h1>, <h3> or <h2>? (a) <h1> (b) <h3> (c) <h6> (d) <h2>
  37. 37.📋 Does this list show bullets or numbers?
    <ul>
      <li>Banana</li>
      <li>Litchi</li>
      <li>Papaya</li>
    </ul>
    (a) numbers (b) bullets
  38. 38.True or false: HTML on its own can pick a random number. (a) True (b) False
  39. 39.True or false: <title> has a closing tag. (a) True (b) False
  40. 40.🔗 Which words do you click on?
    <a href="https://example.com">Take the quiz</a>
    (a) href (b) Play games (c) https://example.com (d) Take the quiz

Answer key

  1. 1
  2. <hr>
  3. No
  4. has a closing tag
  5. 1
  6. Planets
  7. Yes
  8. bullets
  9. in a new tab
  10. </em>
  11. The red kite
  12. True
  13. <link rel="stylesheet">
  14. Play games
  15. False
  16. alt
  17. maths.html
  18. <li>
  19. <ul>
  20. </i>
  21. Rain today
  22. 4
  23. in the head
  24. True
  25. 3
  26. </p>
  27. </small>
  28. False
  29. HyperText
  30. in a new tab
  31. Yes
  32. to describe the image
  33. 150
  34. <body>
  35. 350
  36. <h1>
  37. bullets
  38. False
  39. True
  40. Take the quiz

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